react-window: List: broken rendering if scrolling while `display: none` is set + not scrolling to the right element

Steps to reproduce:

  • Have a list
  • Scroll it
  • Filter it
  • Even if the new filtered list is not long enough to be scrollable react-window still thinks that it is scrolled, and some rows might not get rendered

I’ve made a video showcasing this here.

Until this is fixed I think I’ll either have to render the list twice by forcing an update of scrollOffset by triggering a scroll event, or manually setting scrollTop = 0 before each filtering round or something.

scroll_offset.mp4.zip

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 24 (5 by maintainers)

Most upvoted comments

Looks like something funky is going on with your params (like maybe you aren’t updating the itemCount or something). Unless you can provide a repro, I can’t really help here.

I’m going to close this for now because I don’t like keeping unactionable issues open. We can keep talking though, and I’ll be happy to look at a repro if you can share one.