bakerac4 / glimmer-native

77 stars 5 forks source link

ListView duplicating items as it recycles views/scrolls #23

Open billdami opened 5 years ago

billdami commented 5 years ago

It appears that there is a bug in <ListView> where if you have a list of items that extends beyond the visible viewport, as you scroll down, the newly rendered items at the bottom of the list will just be duplicates of items at the top of the list, instead of the next actual items in the backing items array. E.g. :

//For a backing array of: 
//['Item A', 'Item B', 'Item C', 'Item D', 'Item E']

<ListView>
    <Item>Item A</Item>
    <Item>Item B</Item>
    <Item>Item C</Item>
     {{!-- below viewport --}}
    <Item>Item A</Item>
    <Item>Item B</Item>
     ...
</ListView>

(pseudo code representation to illustrate whats happening)