Skip to content

Modified state gets screwed when a subform is toggled #57

@sakovias

Description

@sakovias

Hi @slavafomin, that's a great library, really liking it.

Here's an issue I came across when working with "nested" forms. I've checked that it occurs on versions 2.3.2 and 2.4.2 (possibly others). I have a form with a nested ng-form, the former gets toggled with ng-if. It looks like I can trick it into a "modified" state.

Here's the Plunker: https://plnkr.co/edit/YuYuG6M3SGWYiFE3jBKa?p=preview.

  • Start with a form with selected checkbox "B":

modified_1

  • Select option "foo" in the sub-form. The form is modified as expected:

modified_2

  • Unselect checkbox "B". The form is still modified:

modified_3

  • Select option "B" again. The form values are now different from the starting ones, but it's no longer marked as modified:

modified_4

Please let me know if there's a workaround and/or fix. Appreciate your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions