-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: resolve late subscription issue for formState properties(isDirty) #13072
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
base: master
Are you sure you want to change the base?
Conversation
Could you include some unit tests for this change? |
0732136 |
thanks, let me discuss this issue on the issue thread. |
Hi @bluebill1049 I checked the your comment on the issue. |
sounds good 👍 |
thanks for review commit: e7d3fca This Commit proposes syncing isDirty internally based on dirtyFields to keep form state consistent for late subscriptions. |
This fixes the issue where components subscribing to formState properties (like isDirty, dirtyFields) after form values have changed would receive stale state values.
Problem:
Solution:
Always keep _formState.isDirty up-to-date regardless of subscription status in updateTouchAndDirty()
Fixes: #[issue-number]