clauderic / clauderic/react-tiny-virtual-list

`stickyIndices` with array that does not start from '0' (eg: `stickyIndices={[1]}`) causes missing rows

Open
#92 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.5k
Forks
159
PR merge metrics
No merged PRs in 30d

Description

Hello, I was trying out this library **v2.2.0**, with the `stickyIndices` feature.

When I tried `stickyIndices=[0, 5, 10]` everything works nicely.
But when I tried an array that does not start with '0', for example `stickyIndices=[1]`, I get results that look like below:

![YjjVbobAoo](https://user-images.githubusercontent.com/28751745/98564126-4575cf00-22ac-11eb-8dc0-88bb7f820cd1.gif)

Here's a codesandbox for repro: https://codesandbox.io/s/react-tiny-virtual-list-sticky-issue-4hgjo

_BTW_ just want to say thanks for creating this library. The code is very nice to read and helped me a lot in understanding virtualization 👍

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.