bvaughn / react-window

React components for efficiently rendering large lists and tabular data
https://react-window.now.sh/
MIT License
15.81k stars 785 forks source link

overscanCount = 0? #67

Closed stnwk closed 5 years ago

stnwk commented 6 years ago

Hi :)

I was wondering whether you'd consider to allow actually setting overscanCount value of 0. Currently the required minimum is 1 to enable tabbing, which is completely understandable.

However, I am currently working on a case where the rendered items are rather expensive and tabbing is not important/disabled on purpose so I'd really appreciate a way to override this.

Thanks for your consideration!

bvaughn commented 6 years ago

Hi :)

I think I understand why you'd want this ability, although I also think it's an edge case and in nearly all cases– forcing an overscan for accessibility is the "right" thing to do.

I don't really have the time to implement this, but if you'd be interested in submitting a PR with all of the following, I'd probably be willing to merge it:

stnwk commented 6 years ago

Thanks!

I'll take care of this then, expect a PR when your back from your holidays :)

(not being creepy, just following you on twitter haha)

Enjoy your family time!

bvaughn commented 6 years ago

Thank you! 😄 Sounds good to me.

stnwk commented 5 years ago

Full disclosure: I ended up not needing this particular option, so there's no need for me at this time to implement it.

Still, thanks again for your time & thoughts!

itdhsc commented 3 years ago

This was exactly the feature we needed right now. Our background: We have a default height for each row and the actual height is calculated after the data is fetched from the server. The user has the possibility to scroll to a specific item automatically and display it at 'start'.

The problem: If the item in the overscan area before the scrollToItem has a height greater than the default height the item that should be aligned at 'start' is pushed down by the height difference after the data was fetched from the server.