Skip to content

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