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

make md-disabled bindable for switch.js #306

Closed
JanJordan opened this issue Oct 27, 2016 · 2 comments
Closed

make md-disabled bindable for switch.js #306

JanJordan opened this issue Oct 27, 2016 · 2 comments

Comments

@JanJordan
Copy link

Afaik right now something like this does not seem to work:

<md-switch md-disabled.bind="! configuring" md-checked.bind="eco"></md-switch>

The switch can only be set disabled initially with something like: md-disabled="! configuring"

Maybe something like this could work (in switch.js) to make this dynamic?

mdDisabledChanged(newValue) { if (this.checkbox) { this.checkbox.disabled = !!newValue; } }

@Thanood
Copy link
Collaborator

Thanood commented Oct 27, 2016

Yep, good catch! 👍
Will do that.

If you want, you can also issue a PR and I will merge it.

@JanJordan
Copy link
Author

Thank you @Thanood, great!
sorry but i was submerged in work, no time to create the pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants