question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for usage within react-window

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
sergej-scommented, Dec 5, 2019

@Grsmto, don’t you have an example of how to use simplebar with react-window? I really cannot find a way…

3reactions
barbalexcommented, Nov 8, 2020

@dustinlakin

Two things were missing:

  • the import for simplebar.min.css
  • Styling to hide the native scrollbar

See: https://codesandbox.io/s/simplebar-react-window-forked-bp3hs?file=/src/App.js

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found