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 binding default model values on first initialization #110

Closed
garygreen opened this issue Nov 14, 2013 · 1 comment
Closed

Data binding default model values on first initialization #110

garygreen opened this issue Nov 14, 2013 · 1 comment

Comments

@garygreen
Copy link

When using simple data binding on i.e a select element, when a model is created it will not upon creating automatically set the values as on the select elements. This should be the desired effect as on first initialization the model is out of sync with what value is actually on the element. In my opinion, it should upon being created transverse through the model bindings and set the values as on the elements, however if values are supplied when creating the agility object are supplied it use those values instead and 'sync' with the bound elements.

Is there any decent way around this, aside from creating the model object with default values which can be cumbersome and add unnecessary code?

@phonovision
Copy link

If the bound variable is null previous to adding the options, is seems to work as you intend.

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