Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data-bind options as list rather than object #14

Open
mcshaz opened this issue May 23, 2015 · 1 comment
Open

data-bind options as list rather than object #14

mcshaz opened this issue May 23, 2015 · 1 comment

Comments

@mcshaz
Copy link

mcshaz commented May 23, 2015

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.

@rniemeyer
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants