bvaughn / react-window

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

scrollDirection state is incorrect for RTL lists #689

Closed DevinFrenze closed 1 month ago

DevinFrenze commented 1 year ago

I think the scrollDirection state is incorrect for fixed and variable sized lists when direction="rtl" . Whether I am scrolling right or left, the scrollDirection state is "backward". This interfere's with the list's overscan rendering.

Tested on MaxOS Chrome, Safari, and Firefox. I think this applies to any browser for which the "RTLOffsetType" is "negative".

I think I know the reason and will submit a pull request with a potential fix.