polymer-1.x

Polymer 1.x: How to use dataSource function to filter iron-data-table?

强颜欢笑 提交于 2020-01-07 05:43:09
问题 Here is the Plunk. I want to implement the dataSource filtering function for <iron-data-table as described in the accepted answer to this SO question. My problem is the docs here do not give an example of how to accomplish this. Eventually, I will want to have a complex set of filters (think: control panel ) on a large data set of items. I have tried copying the approach employed by dom-repeat described in the docs here but without success. http://plnkr.co/edit/cGykY65HWnK4pIQ0qx8O?p=preview

Polymer 1.x: How to reset entire app after logout

天大地大妈咪最大 提交于 2019-12-23 23:18:24
问题 I have a Polymer app. When a user logs out, I want to reset the entire app to its original state. (Right now, when the user logs back in after logging out, the app returns the user to the app state and page they were on when they logged out.) Is there any convenient (i.e., global) app design or code pattern for accomplishing this? If there is nothing convenient/global, please show how to accomplish this locally (i.e., on an element-by-element basis). Edit After some research (and

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 ).

Polymer 1.x: How to filter iron-data-table?

巧了我就是萌 提交于 2019-12-13 08:27:49
问题 How do I add a filter attribute to <iron-data-table ? (Please post a plunk demo.) I forked this plunk. Then I tried to add a filter by adding the following line: <iron-data-table ... filter="['item.user.name.first.length', '< 5']"> Which broke the plunk. Here is the new (now broken) plunk. The documentation here describes the filter attribute as follows: filter An array containing path/filter value pairs that are used to filter the items. But it lacks an example of how to use it. How do I add

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