-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide index for custom item component #220
Comments
2 tasks
Hi, |
Released in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
[data-index]
is an attribute Virtuoso provides on each virtual list div, where the value is the index of the item in the array. It would be nice to be able to have data-index on each div, either out of the box or with some customization.It is helpful to track where you are on the list to perform actions, for example, scrolling to the next virtual list item.
Describe the solution you'd like
Something like one of these:
CustomItemComponentProps
hasindex
(type=number) for user to build custom item with data-indexDescribe alternatives you've considered
I can add index inside each item in my implementation. That works, but is tedious and adds another layer of div in my usage.
The text was updated successfully, but these errors were encountered: