MrWolfZ/ngrx-forms

markAsDirty on empty array not working

bram96 opened this issue · 1 comments

Describe the bug
markAsDirty doesn't work on an empty array. In my code I do have an array that can become empty on user changes and I want to mark that property of the form as dirty. This is not working if the array is already empty, but if it is marked as dirty before the setValue it stays dirty.

The same applies for markAsTouched

To Reproduce
Steps to reproduce the behavior:
See form.reducer.ts in the example at https://codesandbox.io/s/ngrx-forms-issue-template-forked-9u9we

Expected behavior
I would expect both lines in my example to work the same

Library version:
6.3.4

Thank you for this bug report and apologies for the delay. This issue is fixed in v6.3.6.