Replies: 1 comment 2 replies
-
What about just returning null from getScrollElement? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I have a complicated page with multiple virtualizers inside one scrollable element, and I need to switch to the window virtualizers on mobile, but share all the layout, data, etc. I can't replace the
useVirtualizer
hook with theuseWindowVirtualizer
conditionally since it's not allowed by the rules of react, so the only solution is to wrap each hook with a component, and pass a virtualizer to the render prop, context, etc., and render these components by a condition. However, the code becomes messy, and all the benefits of the hook approach are canceled. With theenabled
option it would be possible to disable observers inside theVirtualizer
and use both hooks in one component. It would be possible to check whether the virtualizer is enabled simply by reading thevirtualizer.options.enabled
.Thanks for the great library
Beta Was this translation helpful? Give feedback.
All reactions