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

fix(forms): update dirty before emitting value change #10362

Merged
merged 1 commit into from
Jul 28, 2016
Merged

Conversation

kara
Copy link
Contributor

@kara kara commented Jul 28, 2016

Currently, markAsDirty() and markAsPristine() are called after updateValue. This is fine for when you are checking the dirty or pristine property through an interpolation in the view. However, if you subscribe to valueChanges, it will emit with the control's old dirty/pristine values (because they haven't yet been updated). This PR inverts the calls to resolve this issue.

@kara kara added the action: review The PR is still awaiting reviews from at least one requested reviewer label Jul 28, 2016
@vsavkin vsavkin added pr_state: LGTM and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jul 28, 2016
@kara kara merged commit 7c76a75 into angular:master Jul 28, 2016
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants