frapontillo / angular-bootstrap-switch

AngularJS directive for the bootstrap-switch jQuery plugin.
Apache License 2.0
301 stars 108 forks source link

Trinary values #94

Closed AmitMY closed 8 years ago

AmitMY commented 8 years ago

When the switch is initiallized, it has value of '' and is in the middle (not true nor false) Is there a way that after you change it to get it back to the initiallized state?

(I created a boolian filter for a table, which if empty: shows all, if "a" shows all a, and if "b" shows all "b", and I want that after a change I could get it back to empty, so ill see the entire table again)

Edit: bootstrap switch has support for it, can you add it? https://github.com/nostalgiaz/bootstrap-switch/releases/tag/v3.0.1

frapontillo commented 8 years ago

You can set the switch model to undefined, that will make the switch transition back to an indefinite state.