JulioWar / jw-bootstrap-switch-ng2

Bootstrap Switch for Angular 2+
https://juliowar.github.io/jw-bootstrap-switch-ng2/
MIT License
43 stars 14 forks source link

Disable functionality #29

Closed ahadjithoma closed 6 years ago

ahadjithoma commented 6 years ago

It seems that when the switch is inside a form and that form is disabled, the switch is still enabled. I know about the switch-disabled="condition" but it would be more helpful if i could disable the Switch based on the form status.

for example:

<!-- .html -->
<form [formGroup]="myForm">
  <bSwitch></bSwitch>
  <input type="text" />
</form>
// .ts
...
myForm.disable()

i am expecting the bSwitch to be disabled, but only the input type is disabled.

JulioWar commented 6 years ago

Hello @andreash92 I didn't know about that funtionality, I going to take the time to do that in the weekend.

Thanks

ahadjithoma commented 6 years ago

thanks i really appreciate it!

MarcosRibeiroJesus commented 6 years ago

Same here, good to hear about the solution soon. Thanks @JulioWar! =))

JulioWar commented 6 years ago

Thanks for your patience guys, The version 2.0.2 is available. Test it and let me know if it's working fine.