-
Notifications
You must be signed in to change notification settings - Fork 108
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
Indeterminate state not triggered #76
Comments
Acknowledged, thanks for reporting this! |
Hi. Do you have some estimation for the fix? |
Sorry @kubijo, I have no idea when I'll be able to work on this. :( |
I see. Well lets hope you'll get some time soonish. Thanks for reply. |
We are having the same issue, hope you can fix this soon. |
Sorry for keeping you guys wait, the change is now available in the |
There is still the problem that the switch does not always come out of the indeterminate state when you click on it. You can see this in the same plunker: |
@mirow you're right, I am going to reopen this. |
I think you need to set the state to null when the state is indeterminate (as explained here: Bttstrp/bootstrap-switch#426 ) Maybe you could always set the state to null in the bootstrapSwitch constructor, and update the state in scope.$watch? Also, currently you only check if the model value matches the true value, you don't check whether it matches the false value. Instead you should do something like this:
(This is actually to fix a slightly different bug: if the model value is undefined, then the switch is set to indeterminate state correctly. But if the model value is null, then the switch is set to 'false' state, no matter what the ng-false-value is.) |
Can you try it with 0.5.0? |
In version 0.5.0 the switch is always in the state indeterminate - regardless of the model value! |
@adestis-ds that's impossible, all tests pass and you can see that the behavior is correct at the demo in the first post. |
Closing due to inactivity. |
Still buggy. When state is ON, then set model to NULL, then click the swiotch, the model is empty but visual state display OFF. |
It's clearly not working. Lol... why was the issue closed. |
@jnicolau then feel free to post a breaking sample. |
There's a new, slightly different, bug: |
So it is an issue related to switching from false to |
Are there any updates to this bug? When |
When the
ng-model
bound variable is undefined, it is said that the switch should be in indeterminate state - that however does not work. Below is link to plunker.http://plnkr.co/edit/1SaSvTIzOeyjqWCl4GLH?p=preview
The text was updated successfully, but these errors were encountered: