iron-elements

How to filter an iron-list in polymer 1.0?

走远了吗. 提交于 2019-12-21 04:31:18
问题 The dom-repeat element offers a filter attribute. Is there a similar way to filter with iron-list ? For example: Given a list of people, I want to filter the ones born in a specific city. 回答1: As iron-list unfortunately doesn't offer a filter attribute, there is no declarative pattern making this possible. You can either implement your own simple list element making use of dom-repeat 's filter property. (With element inheritance coming back in future releases, you might extend iron-list ).

How to filter an iron-list in polymer 1.0?

北城以北 提交于 2019-12-03 13:33:28
The dom-repeat element offers a filter attribute. Is there a similar way to filter with iron-list ? For example: Given a list of people, I want to filter the ones born in a specific city. daluege As iron-list unfortunately doesn't offer a filter attribute, there is no declarative pattern making this possible. You can either implement your own simple list element making use of dom-repeat 's filter property. (With element inheritance coming back in future releases, you might extend iron-list ). However, the best practice I currently see is the use of a computed property: <template> <iron-list