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

How to listen for mdc-switch "change" event? #64

Closed
green3g opened this issue Jan 24, 2022 · 2 comments
Closed

How to listen for mdc-switch "change" event? #64

green3g opened this issue Jan 24, 2022 · 2 comments

Comments

@green3g
Copy link

green3g commented Jan 24, 2022

Hello - is there any event dispatched from the mdc-switch component when the toggle happens? I have binding set up for selected.bind to bind to a value but I want to perform some logic after the toggle changes.

I think this is what the API tab would show - however I'm not able to view the API page on this component:

image

Happy to try and contribute a fix if you pointed me in the right direction I'm just not seeing where this information would be.

@green3g green3g changed the title Possible for mdc-switch change event How to listen for mdc-switch "change" event? Jan 24, 2022
@MaximBalaganskiy
Copy link
Contributor

MaximBalaganskiy commented Jan 25, 2022

change event

this.emit('change', {}, true);

Not all api tabs are complete unfortunately

@green3g
Copy link
Author

green3g commented Jan 25, 2022

Wow that was so obvious. Thanks!

@green3g green3g closed this as completed Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants