gvas / knockout-jqueryui

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

change to "checked:" does not update the button UI #52

Closed bago closed 9 years ago

bago commented 9 years ago

The JQUI docs say you must call "refresh" if you alter the input status.. I was expecting knockout-jqueryui to do that for me:

$(el).button('refresh');

bago commented 9 years ago

Well, I was too hurry opening this...

I needed 2 things, but it worked: 1) I had to add the "refreshOn: observable" option to the button binding 2) I had to move the checked binding BEFORE the button binding (otherwise it was refreshing before changing the value and I had opposite results).