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

can.stache and lists {{#data.items}} #1551

Closed
justinbmeyer opened this issue Mar 24, 2015 · 0 comments · Fixed by #1553
Closed

can.stache and lists {{#data.items}} #1551

justinbmeyer opened this issue Mar 24, 2015 · 0 comments · Fixed by #1553
Labels
Milestone

Comments

@justinbmeyer
Copy link
Contributor

If data in {{#data.items}} changes from {} to {items: new can.List()} and then items are inserted in the can.List, live binding does not work.

This is due to the function created by makeEvaluator being only singly bound with:

can.compute(evaluator, null, false, true)

This is a performance improvement. In most cases, just the single value retrieved by the evaluator function is enough to be responding to. However, in this case, we need to not only bind to the evaluator data, but also the "length" property of the list value returned by evaluator.

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

Successfully merging a pull request may close this issue.

1 participant