Skip to content

Switching tabs reset the content. #1585

Closed

Description

@Salma7amed

On switching tab the content of the form fields are reset to default.

Example I have 2 tabs that contain forms. When filling and switch back and forth between them, I expect to get the input fields of the form to contained the entered values and not to be reseted on switching.

Here is a plunker http://plnkr.co/edit/oK7TAQ64lAZspL0G7ZA4

Activity

  1. yobud commented on Oct 25, 2016

    @yobud

    I've got the same problem.

    The problem is that content is destroyed while switching to another tab. That make this md-tabs usable only for static content...

    Or maybe I did miss something in the doc.

    In fact, the solution has been proposed : #1472

  2. RoxKilly commented on Oct 26, 2016

    @RoxKilly

    @Salma7amed , if you link your form inputs to class variables -- eg: by using formGroup or formControl --, I think the form state will be rebuilt for you when you switch tabs since the underlying variables would be unchanged.

  3. Salma7amed commented on Oct 26, 2016

    @Salma7amed
    Author

    @ZeBigDuck so the fix will be applied in the next release ?.

    @RoxKilly the thing is I don't want it to rebuild the form on each switch. Because in case of tabs containing huge amount of data, it causes unnecessary lag due to the rebuild on each switch.

  4. jelbourn commented on Oct 27, 2016

    @jelbourn
    Contributor

    Dupe of #1472

  5. angular-automatic-lock-bot commented on Sep 5, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  6. locked and limited conversation to collaborators on Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions