-
Notifications
You must be signed in to change notification settings - Fork 26.2k
fix(forms): set state before emitting a value from ngModelChange #21514
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but will have to wait for a major release.
Note: we need to check Google3 to see how "breaking" this change will be, so we can figure out a merge plan. |
@kara Thanks for the quick review. Agreed that it was confusing. The callback name Good point about the previous value. I definitely overlooked that. But as you noted it's possible for the user to store the previous value. If accessing the previous value is necessary, I think I'd be in favor of more explicit semantics like having Waiting for the next major release is fine. Our team can work around it by explicitly using the FormControl instead of relying on the callback. |
http://b/73123567 @kara (reverted as cf8d512) |
good thing we didn’t merge it into a patch branch we should discuss what to do about this PR - should we reattempt to land it + fix g3? abandon it? are there other options? |
we should decide what to do with this - should we attempt to merge it again, fix g3 and document the breaking change? what's the impact of this on the non-google developers? at google out of all the projects only one seem to be affected. @StephenFluin can you please help to assess? thanks |
I believe this change seems to be worthwhile because it changes an undocumented behavior into an explicit one. Checking with @kara for any other challenges this might create for developers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@kara asked the fixed cl to be merged. This PR is ready to go now. |
Breaking change message (missing from commit):
|
…nge (angular#21514)" This reverts commit 9744a1c.
…nge (angular#21514)" This reverts commit 9744a1c.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Closes #21513.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #21513
What is the new behavior?
State is set before the value is emitted.
Does this PR introduce a breaking change?
Other information