knockout-jqAutocomplete
knockout-jqAutocomplete copied to clipboard
data-bind options as list rather than object
in order to
- emulate existing ko behavior, such as the 'options' binding
- flawlessly fit in with plugins like the knockout validations library
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.
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.