-
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
mat-slide-toggle component's toggle() method does not emit change event #11812
Labels
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Comments
toggle
method does not emit change
event
If this is indeed a bug and not "as intended", I can probably help out and put together a PR to fix. |
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Jun 19, 2018
…m toggle method Fixes the slide toggle not propagating its value to the `ControlValueAccessor` or dispatching its change event when its value is changed through the `toggle` method. It seems like we had a test for one of these cases, but it wasn't failing when it was supposed to. Fixes angular#11812.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Jun 19, 2018
Fixes the slide toggle not propagating its value to the `ControlValueAccessor` when its value is changed through the `toggle` method. Fixes angular#11812.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Jun 23, 2018
Along the same lines as angular#11812. The checkbox doesn't update its `ControlValueAccessor` value when it is toggled via the `toggle` method.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Jun 30, 2018
Along the same lines as angular#11812. The checkbox doesn't update its `ControlValueAccessor` value when it is toggled via the `toggle` method.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Aug 1, 2018
Along the same lines as angular#11812. The checkbox doesn't update its `ControlValueAccessor` value when it is toggled via the `toggle` method.
jelbourn
pushed a commit
that referenced
this issue
Aug 23, 2018
Along the same lines as #11812. The checkbox doesn't update its `ControlValueAccessor` value when it is toggled via the `toggle` method.
jelbourn
pushed a commit
that referenced
this issue
Aug 25, 2018
Along the same lines as #11812. The checkbox doesn't update its `ControlValueAccessor` value when it is toggled via the `toggle` method.
vivian-hu-zz
pushed a commit
that referenced
this issue
Nov 6, 2018
Along the same lines as #11812. The checkbox doesn't update its `ControlValueAccessor` value when it is toggled via the `toggle` method.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Jan 4, 2019
Along the same lines as angular#11812. The checkbox doesn't update its `ControlValueAccessor` value when it is toggled via the `toggle` method.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Jun 19, 2019
Along the same lines as angular#11812. The checkbox doesn't update its `ControlValueAccessor` value when it is toggled via the `toggle` method.
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, feature request, or proposal:
Bug
What is the expected behavior?
When calling component's
toggle
method programmatically,change
event should be emitted.What is the current behavior?
Simply flips the boolean value of its
checked
property.What are the steps to reproduce?
StackBlitz code sample with the test:
https://stackblitz.com/edit/angular-material-slide-toggle-test-qzbvad?file=app%2Fmat-slide-toggle-bug.component.spec.ts
What is the use-case or motivation for changing an existing behavior?
This would be very useful when testing behavior, but I can see how it would be useful for some programmatic toggling during regular use as well.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
All
Is there anything else we should know?
no
The text was updated successfully, but these errors were encountered: