Skip to content

Add option to observe horizontal intersection #24

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidisaaclee
Copy link

Thanks for this library – it's a great alternative to other virtualization methods.

I wanted to use this with a horizontal list, but the code assumes vertical scroll. I made these changes for my own use – maybe they'd be useful generally.

Some caveats:

  • This PR is a breaking change (replaces defaultHeight with defaultSize). This could be made backwards compatible by accepting defaultHeight as well, and dynamically figuring out which prop to use.
  • I think it'd be useful to extend this further so that users don't need to choose vertical or horizontal: allow observing both vertical and horizontal, and allow user to omit the axis they don't care about. (I think that approach would avoid a breaking change.) I might be interested in making this change if I personally need it in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant