Skip to content
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

How to get first and last visible item in the virtual list #423

Open
slidenerd opened this issue Dec 22, 2023 · 0 comments
Open

How to get first and last visible item in the virtual list #423

slidenerd opened this issue Dec 22, 2023 · 0 comments
Labels

Comments

@slidenerd
Copy link

slidenerd commented Dec 22, 2023

  • Currently there seems to be no way to do this
  • The Scroll event simply returns a range that includes buffered items as well
  • We have a getOffset() method
  • There s no method to get the sizes of all items so that you can do some math (I have a dynamic item height list where each item may have a different size)
  • One way i can think of is to assign an id to each of the rendered items or assign a ref to all of them and then compare their top with current offset, is there a better way?
  • Any one mind sharing some ideas or suggestions on how to achieve this?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant