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

Comments

Projects
None yet
1 participant
@justinbmeyer
Contributor

justinbmeyer commented Mar 24, 2015

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.

@justinbmeyer justinbmeyer added the bug label Mar 24, 2015

justinbmeyer added a commit that referenced this issue Mar 24, 2015

@justinbmeyer justinbmeyer added this to the 2.2.2 milestone Mar 24, 2015

justinbmeyer added a commit that referenced this issue Mar 27, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment