-
Notifications
You must be signed in to change notification settings - Fork 264
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
[Bug] {{each}} item binding with square brackets doesn't update, when right side is an aliased attribute #582
Comments
Based on the fact that In the screenshot, the left side is the working PathExpression, and the right side is the not-working AttributePathExpression. Specifically, PathExpression's call to As for a fix - Just to see what happens, since I suspected the early-return to be an issue, I tried changing the initial early-return check in Like so: function swapLastDependency(dependencies, expression, context) {
- if (!expression.segments.length) {
+ if (!expression.segments.length && !expression.meta) {
return dependencies;
} That did fix the issue, and all the other tests pass... but I have no idea what the intent behind @nateps can you provide some context / advise? |
It was an old bug which made me kill myself at the previous job. Thank you a ton, @ericyhwang! |
The title is long and complicated. I have a repro of the issue using Derby's component tests:
ee2e1b0
Also putting the example here:
Doing a
model.set('_page.greetingIds.0', 'foo')
, I'd expect the binding to update, but it doesn't.The binding does update properly under these other scenarios:
model.set('_page.greetingIds', ['foo'])
{{ _page.greetings[@greetingIds[#i]] }}
{{each _page.greetingIds as #id, #i}}
The text was updated successfully, but these errors were encountered: