I am using Knockout with jQueryUI's autocomplete (and Pixel Admin bootstrap template).
I have created the input and bound that to my data:
<input data-bind="autoComplete: userSearch, value: userSearch, optionsText: 'fullName', optionsValue: 'userID', autoCompleteOptions: { autoFocus: false, appendTo: '#user-panel' }"" >
userSearch
is a ko.computed
that returns the data-set (array of objects).
This works fine.
My question is, how do I use the value that is returned by the autocomplete to filter the original data-set by the userID of the data returned?
I'm not really sure why the value property needs to be set to the dataset, but if I don't do this, when I select an option it only returns the userID (because that is the options value set).