question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prepending items stops work correctly for negative firstItemIndex values

See original GitHub issue

In Prepending Items scenario when firstItemIndex became negative (when we add more than START_INDEX users) scroll preserving stops working if items with negative indexes rendered in a viewport.

For easy reproduction you can set START_INDEX to 1000, usersToPrepend to 1000 and add Header with Add button (to overcome problem with startReached triggered only once from issue #242) components={{Header: () => (<button onClick={prependItems}>Add more</button>)}}.

To work around this problem currently, we can use big enough value as the initial firstItemIndex.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
petyosicommented, Dec 22, 2020

Acknowledging that, I should document this.

0reactions
github-actions[bot]commented, Dec 29, 2020

🎉 This issue has been resolved in version 1.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prepending Items - React Virtuoso
Appending items to the list is straightforward - the items at the bottom do not displace the currently rendered ones.
Read more >
Blue-Pelican Java Textbook, ver 1.10 - Amazon S3
This work ethic is typical of the remainder of the book. Rest assured that full ... Arrays of objects, comparison of array values,...
Read more >
androidx.wear.compose.material - Android Developers
This function is used to set the current value of LocalTextStyle , merging ... right o O O O X O - is...
Read more >
Prepending data to a FlatList always shows the first child
There is an undocumented prop maintainVisibleContentPosition on ScrollView that do what you want, but unfortunately it's not working on ...
Read more >
Programming in Python 3
The list += operator extends the list by appending each item of the iterable it ... a negative rounding value is used a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found