Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/Remove for FieldArrayType does not mark the form dirty. #1679

Closed
Jascen opened this issue Jul 18, 2019 · 1 comment · Fixed by #1824
Closed

Add/Remove for FieldArrayType does not mark the form dirty. #1679

Jascen opened this issue Jul 18, 2019 · 1 comment · Fixed by #1824

Comments

@Jascen
Copy link

Jascen commented Jul 18, 2019

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request

Current behavior
Adding/Removing records in a custom FieldArrayType does not mark the dirty flag.

Expected behavior
Any user-driven actions will mark a form dirty. Per Angular's #16370, it is the action's responsibility to call markAsDirty().

Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/angular-ferxhg

What is the motivation / use case for changing the behavior?
Every implementation of Field Array will have to override, call super, and then mark the form as dirty for both Add() and Remove().

@aitboudad
Copy link
Member

added in v5.5.0 and thanks for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants