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.

Problems with scrolling

See original GitHub issue

I am trying to use List, something like this

<AutoSizer>
  {({ height, width }) => (
    <List
      width={width}
      height={height}
      rowHeight={48}
      rowRenderer={({ index }) => (
        <div style={{ height: 48 }} key={index}>Item {index}</div>
      )}
      rowCount={rows.size}
    />
  )}
</AutoSizer>

But instead of smoothly scrolling I get terribly jerky on chrome 61.0.3163.100 https://www.screencast.com/t/I7yRYcu71 on FF 55.0.3 I had empty space at the end https://www.screencast.com/t/JOT1Bswz

Without AutoSizer the problem doesn’t disappear. I’m using the latest versions of react and react-virtualized.

What am I doing wrong? Who faced such a problem?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:23 (1 by maintainers)

github_iconTop GitHub Comments

38reactions
TrySoundcommented, Sep 26, 2017

@yuristrelets That’s because you should pass style and key (not index) props to your div. rowHeight should be set via component props.

      rowRenderer={({ style, key, index }) => (
        <div style={style} key={key}>Item {index}</div>
      )}
4reactions
LiranCohencommented, Dec 5, 2020

In case anyone is having this issue, passing the style down to whatever actual div is rendered for the row is what fixed this for me.

I had originally passed down the style property to the row component, but I didn’t use that property anywhere in the row. I then passed it down to the base row component which passed the style to the actual div creating the row.

Hope this helps anyone else.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problems with Mouse Scrolling - Techwalla
Broken, erratic or slow scrolling can crop up from improper settings, hardware issues, or outdated or incorrect mouse software.
Read more >
How to Fix It When Your Mouse Scroll Is Not Working - Lifewire
When the mouse won't scroll, there are two issues that most commonly cause it. The first is dust and dirt causing mechanical issues...
Read more >
How to Troubleshoot a Computer That Scrolls by Itself
Unexplained scrolling can be caused by a number of issues, so troubleshooting involves identifying the problem through a process of elimination.
Read more >
How to Fix Scrolling Not Working Issue in Chrome
If the problem persists, re-enable that extension, then disable the next one, repeating the above process until the scrolling problem stops. Be ...
Read more >
FIX: Windows 10/11 Scrolling down on its own. - wintips.org
Method 1: Disable 'Scroll inactive windows when hovering over them' option. ... This problem has been reportedly resolved by changing the Mouse settings....
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