How To Re Run Dom-repeat With Sort When Bool Property Changed In Polymer Element
How can I rerun sort and render element when something changed in my element or whenever I want from code or automatically? Thank you
To re-run the filter or sort functions when certain sub-fields of items change, set the observe property to a space-separated list of item sub-fields that should cause the list to be re-filtered or re-sorted.
Example:
<template is="dom-repeat" items="{{employees}}"filter="isEngineer" observe="type manager.type">
More info here: https://www.polymer-project.org/1.0/docs/devguide/templates.html#filtering-and-sorting-lists
PS: you need to set your field using this.set("array.index.field", value), otherwise your observer won't be notified
Post a Comment for "How To Re Run Dom-repeat With Sort When Bool Property Changed In Polymer Element"