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.

Scrolling issues if style is omitted

See original GitHub issue

Hi, it’s my first time using react-window for a project of mine. You can see the current usage of it here.

I encountered an issue where my list would start stuttering and experiencing major scrolling issues which I assumed was related to some data being re-rendered or something along that line. Days of research and experimentation later, I discovered that the issue could be replicated even in one of your examples; the memoized list. If I simply remove style={style} from the Row, then upon scrolling you’ll see the issues appear.

This seems to contradict the documentation which says

style: Object = null Optional inline style to attach to outermost <div> element.

So my question is, what can be done to resolve this issue?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
bvaughncommented, Jan 23, 2019

If I simply remove style={style} from the Row

That would not be using the library correctly. It’s required that you attach the style prop to whatever elements your item renderer returns, because that’s how react-window positions them.

The docs entry you linked to about style is referencing an optional style that you can set on the list itself (not the individual items). All of the docs examples should show correct usage of the style prop passed to the item (row) renderer.

Hope this clears things up!

2reactions
bvaughncommented, Mar 8, 2019

Took me a bit, but I added a section to the FAQs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to prevent overflow scrolling in CSS - LogRocket Blog
This is the scrolling overflow problem related to our CSS styling. ... To do this, add the outline style to the root of...
Read more >
CSS overlay scrolling issues - Stack Overflow
Essentially, wondering if overlay scrolling while freezing the behind div is possible in only css? Then once the front div is gone, unfreeze...
Read more >
Prevent Page Scrolling When a Modal is Open | CSS-Tricks
If we know the top of the scroll location and add it to our CSS, then the body will not scroll back to...
Read more >
Website transparent header on scroll missing background ...
Hi I don't know why but it is supposed to be transparent and on scroll it changes to background is white and the...
Read more >
border-top - CSS: Cascading Style Sheets - MDN Web Docs
The three values of the shorthand property can be specified in any order, and one or two of them may be omitted. Values....
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