Best practice for adding a item to a core-list data model when grouped.

107 views
Skip to first unread message

Daniel Chin

unread,
Feb 10, 2015, 5:21:54 AM2/10/15
to polym...@googlegroups.com
Hi Guys

I am trying to add a item to a core-list when using groups. All is great when first initialised and render of the grouped data-set. The problem is when I want to add a new item, The grouping is setup using a nested data array ( list[ [item1,item2] ] )

When it is time to add a new item I simply try this approach list[0].push(newItem) to add the item to the end of the first group. What I am noticing is that an item jumps up from the second group into that position not the item I intended to add

I am unsure if this is a issue or if there is a best method of adding items to core-list when in group mode.

Regards

Daniel. 

Daniel Chin

unread,
Feb 10, 2015, 9:30:55 AM2/10/15
to polym...@googlegroups.com
After further investigations it seems to be duping the last item in the same group or from a group below if there is a large amount of groups within the data-set. Also tried to splice to add the item to the start of the group but this produced the same issue. 

Rob Dodson

unread,
Feb 12, 2015, 11:36:22 PM2/12/15
to Daniel Chin, polymer-dev

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/73697626-bd75-462f-a3ac-a1db69898a13%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages