We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Summary:
<template is="dom-repeat" filter="aFilter" observe="show" items="{{items}}"> <div>{{item.name}}</div> </template> properties: { items: { type: Array, value: function() { return [ {show: false, name: 'A'}, {show: true, name: 'B'}, ]} }
This updates the dom-repeat as expected:
this.set('items.0.show', true);
This however does not update the dom-repeat, although I would expect it to:
var newItem = { show: true, name: 'A' }; this.set('items.0', newItem);
As a workaround I am using splice, which works as expected:
this.splice('items', 0, 1, newItem);
Fiddle: https://jsfiddle.net/stevenjb_chromium/nbndnsk7/
The text was updated successfully, but these errors were encountered:
When you enclose code blocks in triple backticks source code becomes more readable (single backtick for inline code)
Sorry, something went wrong.
@kevinpschaaf is this expected. I would expect this to work as well, but splice is also a proper "workaround".
splice
Confirmed this is a bug with the observe handling when replacing items. Marking as bug.
observe
kevinpschaaf
Successfully merging a pull request may close this issue.
Summary:
This updates the dom-repeat as expected:
This however does not update the dom-repeat, although I would expect it to:
As a workaround I am using splice, which works as expected:
Fiddle: https://jsfiddle.net/stevenjb_chromium/nbndnsk7/
The text was updated successfully, but these errors were encountered: