Closed
Description
Right now, the dom-repeat
filter and sort only refire on array mutations or item subproperty changes with the observe
attribute. However this ignores a very common use case for filtering and sorting: user-driven changes to filter. Imagine for instance a simple list of items with a "text search" filter:
<template is="dom-repeat" filter="search">
<span>[[item.name]]</span>
</template>
<script>
Polymer({
search: function(item) {
return item.name.toLowerCase().indexOf(this.q.toLowerCase()) >= 0;
}
});
</script>
In this scenario, there is no way to make the template re-stamp when an external parameter changes (e.g. q
in the example).
Metadata
Assignees
Labels
No labels