You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[] bug report => search github for a similar issue or PR before submitting
[x ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
I have a form in Angular2 using the Data-Driven method, and when I use form.reset(), the controls are getting cleared, the values of the controls in an FormArray are getting cleared but the amount of the controls aren't (Inside a FormArray).
Expected/desired behavior
I expect that form.reset() will clear also the FormArray (reset their value and amount)
@seklyza The current reset() function mimics a regular HTML5 form reset, so it only clears existing inputs and doesn't remove any inputs that are added programmatically later.
If you want to remove the added controls, rebinding the FormGroup might be cleaner. #11051 will make this possible.
I'm submitting a ... (check one with "x")
Current behavior
I have a form in Angular2 using the Data-Driven method, and when I use form.reset(), the controls are getting cleared, the values of the controls in an FormArray are getting cleared but the amount of the controls aren't (Inside a FormArray).
Expected/desired behavior
I expect that form.reset() will clear also the FormArray (reset their value and amount)
Reproduction of the problem
Plunker: http://plnkr.co/edit/RKWPWC7PBh8yNJvkcWWc
What is the expected behavior?
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
The text was updated successfully, but these errors were encountered: