gvas / knockout-jqueryui

Knockout bindings for the jQuery UI widgets.
http://gvas.github.com/knockout-jqueryui/
MIT License
103 stars 38 forks source link

Buttons don't get correctly disabled when using the disable binding #27

Closed sammuell closed 10 years ago

sammuell commented 10 years ago

When using a button widget in conjunction with the standard disable binding the button does not properly get disabled. The binding just changes the attribute but does not alter the classes.

http://jsfiddle.net/22xPn/1/

This is probably also the case for other widgets but I haven't tested it.

gvas commented 10 years ago

Yes, the button widget isn't synhcronized with the element's disabled attribute. You have to use the widget's disabled option:

http://jsfiddle.net/gvas/x9Rt2/

sammuell commented 10 years ago

True, but it does not work with expressions: http://jsfiddle.net/x9Rt2/1/

gvas commented 10 years ago

No options in any of the bindings in the library supports expressions. I'm planning to change that, but until then please use computeds on your viewmodel.

gvas commented 10 years ago

Keeping this issue closed as another issue, #10 is already open for the expression support.