rniemeyer / knockout-jqAutocomplete

knockout-jqAutocomplete is a Knockout.js plugin designed to work with jQuery UI's autocomplete widget.
MIT License
49 stars 20 forks source link

data-bind options as list rather than object #14

Open mcshaz opened 9 years ago

mcshaz commented 9 years ago

in order to

I would suggest the binding syntax change from:

<input data-bind="jqAuto: { value: myValue, source: myOptions, inputProp: 'name', labelProp: 'description', valueProp: 'id' }" />

to

<input data-bind="value: myValue, jqAutoSource: myOptions, jqAutoInputProp: 'name', jqAutoLabelProp: 'description', jqAutoValueProp: 'id'" />

this would involve using the allBindingsAccessor, rather than just the valueAccessor. I am happy to make these changes & make a pull request if there is feedback that this is a useful (although breaking) change - I guess in the first instance both syntaxes should be accounted for.

rniemeyer commented 9 years ago

I would not necessarily be opposed to allowing additional syntax, but it would be best to be backwards compatible. The other challenge that I see is that the existing value binding adds its own handlers.