-
Notifications
You must be signed in to change notification settings - Fork 114
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
When in Read Only mode cannot change switch state from the code #96
Comments
Please read this first. |
Hi, When I define the HTML file I am not aware will the switch value be true or false. I have to ask the server to get the value. At the same time I want the page to be read only (I only want to show the user the values, I don't want to allow user to edit them).
Thanks :) |
Hi There, I am also expericing the exact behavior that @MobileDevVT is describing. I want to show a page where a user can see some details but cannot modify them. But when I try to use either Can you please fix this bug. |
Same problem here - also tested with version 0.5.0! |
I have this issue too |
+1 |
I have just had some time to check this issue. Wrt the first problem, // does nothing on a disabled switch
$('#switch-disabled').bootstrapSwitch('toggleState');
// does nothing on a readonly switch
$('#switch-readonly').bootstrapSwitch('toggleState'); If you need this, please open a bug on the parent plugin and when that's solved you can open a new integration issue here. For the second problem, |
Hi,
I want to make the switch read only (so that user cannot change its value). But I get the value of the switch as a result of HTTP request. In my HTML file I used
<input bs-switch type="checkbox"
switch-readonly="true"
switch-size="small"
switch-on-text="YES"
switch-off-text="NO"
switch-on-color="success"
switch-off-color="danger"
ng-true-value="'true'"
ng-false-value="'false'"
ng-model="myController.myValue" //this is boolean
I have realized that ng-disabled does not work on bs-switch. It just stays enabled.
If I use switch-readonly=true or switch-active="false" the switch is read only but since myController.myValue is not resolved the switch is in undetermined state and it stays in it even after myController.myValue gets resolved. How can I change the state of the switch (to YES or NO) and afterward set it to readonly? I get value of my ng-model via HTTP request.
Thanks
The text was updated successfully, but these errors were encountered: