Add support for usage within react-window
See original GitHub issueI don’t know if the issue should be posted here or there but let’s discuss.
At the moment it’s impossible to use SimpleBar in react-window
because both plugin create their own element to listen to the scroll.
I don’t know how we could achieve this but it would work nicely together if there was a way to specify the scrollable node (either SimpleBar passing the scrollable node to react-window
or the opposite).
In theory SimpleBar is positioned higher in the DOM than react-window
, so I would guess that it’s to react-window
to accept a scrollableNode
prop.
I see an API like this:
<SimpleBar>
{({ scrollableNode }) => (
<FixedSizeList scrollableNode={scrollableNode}>
{({ index, style }) => {
...
}}
</FixedSizeList>
)}
</SimpleBar>
cc @bvaughn
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
bvaughn/react-window - GitHub
React window works by only rendering part of a large data set (just enough to fill the viewport). This helps address some common...
Read more >Virtualize large lists with react-window - web.dev
react -window is a library that allows large lists to be rendered efficiently.
Read more >react-window
Examples. Fixed Size List; Variable Size List; Fixed Size Grid; Variable Size Grid; Scrolling indicators; Scrolling to an item; Memoized List items ...
Read more >How To Handle DOM and Window Events with React
In React apps, you can use event handlers to update state data, trigger prop changes, or prevent default browser actions. To do this,...
Read more >How to virtualize large lists using react-window
Here's how React Window's virtualization can efficiently display large data sets to meet your DOM performance targets.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Grsmto, don’t you have an example of how to use simplebar with react-window? I really cannot find a way…
@dustinlakin
Two things were missing:
See: https://codesandbox.io/s/simplebar-react-window-forked-bp3hs?file=/src/App.js