-
Notifications
You must be signed in to change notification settings - Fork 6.8k
MdSlideToggle: change event is triggered before the model's value is updated #7074
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
Comments
devversion
added a commit
to devversion/material2
that referenced
this issue
Sep 14, 2017
Whenever the value of the slide-toggle changes through interaction, a `change` event will be emitted. The value change then will be reported to the `ControlValueAccessor` which fires the `ngModelChange` output. Right now the `ngModelChange` output fires after the normal `change` output. This should be the other way around because developers expect the two-way data binding to already reflect the change. Fixes angular#7074
You can use the formControl until the pull to be approuved and included in next update. |
josephperrott
pushed a commit
that referenced
this issue
Sep 25, 2017
Whenever the value of the slide-toggle changes through interaction, a `change` event will be emitted. The value change then will be reported to the `ControlValueAccessor` which fires the `ngModelChange` output. Right now the `ngModelChange` output fires after the normal `change` output. This should be the other way around because developers expect the two-way data binding to already reflect the change. Fixes #7074
andrewseguin
pushed a commit
that referenced
this issue
Sep 29, 2017
#7076) Whenever the value of the slide-toggle changes through interaction, a `change` event will be emitted. The value change then will be reported to the `ControlValueAccessor` which fires the `ngModelChange` output. Right now the `ngModelChange` output fires after the normal `change` output. This should be the other way around because developers expect the two-way data binding to already reflect the change. Fixes #7074
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug, feature request, or proposal:
Bug (it is the only form control that acts like this and it wasn't the case on beta 8)
What is the expected behavior?
When the change event is triggered the model's value should already reflect the new value.
What is the current behavior?
When the change event is triggered, the model value is not updated and still reflects the old value.
This happens with template-driven and reactive forms.
What are the steps to reproduce?
http://plnkr.co/edit/6x5qfWWRwJFb32yr4UX4?p=preview
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Material beta 10
The text was updated successfully, but these errors were encountered: