Closed panther7 closed 5 years ago
Heya, this turned out being harder than expected, but here's a working jsbin https://jsbin.com/qirokegoti/1/edit?html,output
I reproduced #150 as well, it seems that after we update the array, the following calls to recycleElement will receive an element that is configured with a different item, not the one passed as input. I'll add a smaller repro in that bug, hope this jsbin helps!
I used a <template>
to hold the definition of contact elements, and clone a copy each time we need a new one.
Another gotcha - you want to define a itemKey for the item source, so that virtual-scroller can properly distinguish the 2 types; i used the group and contact as prefixes.
It probably makes sense to add this as a demo to the repository - this is a pretty good example
We currently are trying to make this repository focus on the standards side of virtual-scroller
, so I am closing this. See also: https://github.com/valdrinkoshi/virtual-scroller/issues/158#issuecomment-480913127.
We're going to have a separate demos repository later on, so maybe will move this issue there?
Problem is more items type. Could Someone help me with?