-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
slide-toggle fires undesired event when setting a default value #4124
Labels
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Comments
Thanks for the issue. I will look into it tomorrow. |
devversion
added a commit
to devversion/material2
that referenced
this issue
Apr 18, 2017
While initially looking into angular#4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes angular#4124.
devversion
added a commit
to devversion/material2
that referenced
this issue
Apr 18, 2017
While initially looking into angular#4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes angular#4124.
devversion
added a commit
to devversion/material2
that referenced
this issue
Apr 18, 2017
While initially looking into angular#4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes angular#4124.
kara
added
the
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
label
Apr 18, 2017
devversion
added a commit
to devversion/material2
that referenced
this issue
Apr 21, 2017
While initially looking into angular#4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes angular#4124.
kara
pushed a commit
that referenced
this issue
Apr 21, 2017
devversion
added a commit
to devversion/material2
that referenced
this issue
Apr 22, 2017
…r#4218) While initially looking into angular#4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes angular#4124.
devversion
added a commit
to devversion/material2
that referenced
this issue
Apr 30, 2017
…r#4218) While initially looking into angular#4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes angular#4124.
devversion
added a commit
to devversion/material2
that referenced
this issue
Jun 12, 2017
…r#4218) While initially looking into angular#4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes angular#4124.
devversion
added a commit
to devversion/material2
that referenced
this issue
Jun 14, 2017
…r#4218) While initially looking into angular#4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes angular#4124.
devversion
added a commit
to devversion/material2
that referenced
this issue
Jun 14, 2017
…r#4218) While initially looking into angular#4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes angular#4124.
devversion
added a commit
to devversion/material2
that referenced
this issue
Jun 22, 2017
…r#4218) While initially looking into angular#4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes angular#4124.
mmalerba
pushed a commit
that referenced
this issue
Jul 6, 2017
While initially looking into #4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes #4124.
mmalerba
pushed a commit
that referenced
this issue
Jul 6, 2017
While initially looking into #4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes #4124.
mmalerba
pushed a commit
that referenced
this issue
Jul 6, 2017
While initially looking into #4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes #4124.
mmalerba
pushed a commit
that referenced
this issue
Jul 6, 2017
While initially looking into #4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes #4124.
devversion
added a commit
to devversion/material2
that referenced
this issue
Jul 16, 2017
…r#4218) While initially looking into angular#4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes angular#4124.
devversion
added a commit
to devversion/material2
that referenced
this issue
Jul 23, 2017
…r#4218) While initially looking into angular#4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes angular#4124.
andrewseguin
pushed a commit
that referenced
this issue
Jul 27, 2017
While initially looking into #4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes #4124.
andrewseguin
pushed a commit
that referenced
this issue
Jul 27, 2017
While initially looking into #4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes #4124.
andrewseguin
pushed a commit
that referenced
this issue
Jul 28, 2017
* fix(slide-toggle): invalid model change event (#4140)" (#4218) While initially looking into #4124, there were a few more issues inside of the slide-toggle. * ngModelChange event is dispatched at initialization. * Checked state isn't synchronized when state changes through drag. New state after dragging got overwritten by click event on label. * Removes unnecessary logic inside of `change` listener. Change event doesn't fire if underlying checkbox is disabled. Fixes #4124. * Cast NgModel value to a boolean * Properly mark component for check
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.
Labels
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Bug
Currently if you set a default value for a slide-toggle it'll emit a ngModelChange event when the view inits, IMO the correct behavior would be to not emit this event since there was no change at all.
What are the steps to reproduce?
http://plnkr.co/edit/imQpobzGdi3Xl6IbXYo7?p=preview
Or use the component below:
Which versions of Angular, Material, OS, browsers are affected?
All browsers and Angular versions...
Even changing test to
1
the event will also be fired...The text was updated successfully, but these errors were encountered: