dom-repeat max number of items

218 views
Skip to first unread message

Chad Killingsworth

unread,
Apr 27, 2016, 10:52:33 PM4/27/16
to Polymer
I need a dom-repeat that lists only a set amount of items. The tricky part is I'd like it to be applied after filtering/sorting functions. It looks like there is already internal limiting functionality. Any reason this isn't exposed as a public property?

Chad Killingsworth

diego...@gmail.com

unread,
May 21, 2017, 8:04:23 PM5/21/17
to Polymer
Would be great having this functionality. I want only to render the first x elements after filtering & sorting.

Trey Eckels

unread,
May 22, 2017, 2:54:12 PM5/22/17
to Polymer
Are you looking for this in Polymer1 or 2? (or both?)

diego...@gmail.com

unread,
May 22, 2017, 3:21:55 PM5/22/17
to Polymer
I'm working only with Polymer 2.

aaron...@gmail.com

unread,
Jun 2, 2017, 9:07:28 PM6/2/17
to Polymer
This can be done using a filter function. Just check the index param.

Chad Killingsworth

unread,
Jun 2, 2017, 9:19:56 PM6/2/17
to Polymer
I believe that sort is applied only after filtering - so that doesn't really work.

Chad Killingsworth

Aaron Gray

unread,
Jun 10, 2017, 7:06:21 PM6/10/17
to Polymer
On Saturday, 3 June 2017 02:19:56 UTC+1, Chad Killingsworth wrote:
I believe that sort is applied only after filtering - so that doesn't really work.

Yes sort is applied after filtering but sort does not change the number of members so should work but I have not tried it.

Aaron Gray

unread,
Jun 11, 2017, 12:57:35 PM6/11/17
to Polymer

On Sunday, 11 June 2017 00:06:21 UTC+1, Aaron Gray wrote:
On Saturday, 3 June 2017 02:19:56 UTC+1, Chad Killingsworth wrote:
I believe that sort is applied only after filtering - so that doesn't really work.

Yes sort is applied after filtering but sort does not change the number of members so should work but I have not tried it.

Ah, but not for paging, I see now, it needs pre and post sort filtering !
Reply all
Reply to author
Forward
0 new messages