ngneat / forms-manager

🦄 The Foundation for Proper Form Management in Angular
https://www.netbasal.com
MIT License
518 stars 29 forks source link

Initial values not being cleared using blank clear or destroy methods #29

Closed adrianriepl closed 3 years ago

adrianriepl commented 3 years ago

I'm submitting a...

Current behavior

When calling the methods formsManager.clear() or formsManager.destroy() without parameters the existing initial values are not being cleared.

Expected behavior

Calling formsManager.clear() or formsManager.destroy() should also clear the Map of the initial values (initialValues$$).

What is the motivation / use case for changing the behavior?

So you don't have to call removeInitialValue(name) (is actually private) for each set initial value.

NetanelBasal commented 3 years ago

Do u want to create a PR?

adrianriepl commented 3 years ago

Yes, I can create a PR :thumbsup: