Using JQueryUI combobox() with KnockoutJS

This is something I had a great deal of trouble with, but in the end the solution was simple. Basically when using the combobox() autocomplete drop down in jQueryUI (in prototype at time of writing) along side KnockoutJS I found changing your selection in the drop down list didn’t update the viewModel in knockout as expected. This is because knockoutjs attached itself to the change() event of the drop down, and jqueryUI wasn’t raising this event when it changed the drop down. This is easily fixed by adding an event handler to thre jqueryUI combobox which forces the event to be called when the user selects a new option;

            selected: function(event, ui) { 

Thanks go out to the “Rob on programming” blog, which helped me get my head around what was going on in the events in combobox.

  1. #1 by Matthew Hall on February 7, 2013 - 17:25

    Thanks Shawson for publishing this tip. You helped me stave off a mental breakdown :)

  2. #2 by shawson on February 8, 2013 - 14:35

    haha for now….

(will not be published)

I absolutely love these. They came at the lace wigs are good quality, and very soft. Absolutely love these extensions. I just love this hair. Hair came on time, I waited until after hair extensions uk very full, no shedding and it is been installed for 3 weeks now and yes I jus ordered 3 more bundles. Lol. I definitely recommend this company for your bundles ladies. They are soft, hair bundles on the head for human hair wigs and I would continue to recommend them. I have thinner hair so they cover and blend nicely.