bvaughn / react-window

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

VariableSizeList is not working (layout={"horizontal"},direction={window.isRtl ? "rtl" : "ltr"}) for right to left direction onscroll not updating offset correctly? #727

Open Asad-wego opened 1 year ago

Asad-wego commented 1 year ago

can anyone help me in this please.

My code snipt

const onScroll = (e: any) => {    console.log("onScroll::::     ", e);  };
const itemSizeGetter = (index: number) => {
    return window.innerWidth;
  };
<List
          ref={viewPagerRef}
          initialScrollOffset={lastKnownScrollOffset}
          height={"100%"}
          itemCount={steps[localPreference.config.currentPos].length}
          layout={"horizontal"}
          width={window.innerWidth} // Adjust the width to fit all the items
          onScroll={onScroll}
          itemSize={itemSizeGetter}
          direction={window.isRtl ? "rtl" : "ltr"}
        >
          {renderItem}
        </List>