Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Reset for dynamically added elements #263

@200Puls

Description

@200Puls

Description

Hi @notwaldorf and @valdrinkoshi,
thanks for merging the other 2 PRs.
I have encountered another small issue with iron-form when parts of a complex form are lazily added by the dom-if element.

In this case the default values are not saved because the elements are not there when saveInitialValues is called.

Expected outcome

Values of dymically added elements should be reset.

Actual outcome

Values of dynmically added elements are not reset.

Live Demo

In this demo a dynamic element is added after about 1.5 seconds. When the form reset is triggered the value is not reset:

https://output.jsbin.com/foyuquwaru/
https://jsbin.com/foyuquwaru/edit?html,output

Steps to reproduce

Browsers Affected

  • Chrome
  • Firefox

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