knownasilya / ember-toggle

Checkbox based Toggle Switches for Ember
http://knownasilya.github.io/ember-toggle/
MIT License
112 stars 52 forks source link

Support indeterminate state (tristate) #54

Open lolmaus opened 8 years ago

lolmaus commented 8 years ago

Currently Ember has no checkbox addon with support for three states. ember-cli-toggle could be the first!

knownasilya commented 8 years ago

How would you see that working visually in a toggle?

lolmaus commented 8 years ago

Naturally, the knob stays in the middle. Could also change its color.

knownasilya commented 7 years ago

Actually, currently this is almost supported. Basically if the value is not a valid value, then it will set a class invalid-state on the component, which could be used to style the element as indeterminate.

knownasilya commented 7 years ago

We can revisit this I think if the value is undefined we set to indeterminate state. This will take some work to update all of the styles to support this. I don't currently have the time to implement this, so if anyone wants to pick it up, I'd be happy to work with you to get it to the finish line.

lolmaus commented 7 years ago

We can revisit this I think if the value is undefined we set to indeterminate state.

I'm afraid this will be a severely breaking change. We can avoid this with an extra param like tristate=true.

knownasilya commented 7 years ago

It could always be a v6 enhancement.