react-virtualized icon indicating copy to clipboard operation
react-virtualized copied to clipboard

Getting only 22 rows rendered in the list. I have a large list of 1000 items and trying to render it using WindowScroll + AutoSizer + List only renders 22 items

Open sukhpreet96 opened this issue 2 years ago • 1 comments
trafficstars

Getting only 22 rows rendered in the list. I have a large list of 1000 items and trying to render it using WindowScroll + AutoSizer + List only renders 22 items

sukhpreet96 avatar Jan 10 '23 09:01 sukhpreet96

Getting only 22 rows rendered in the list. I have a large list of 1000 items and trying to render it using WindowScroll + AutoSizer + List only renders 22 items

me two

javanoclaw avatar Feb 20 '23 07:02 javanoclaw

The likely cause of the problem must be the lack of the 'scrollEment' prop:

const Test= () => {
  const scrollElementRef = useRef(null);

  return (
    <div className="overflow-y-auto h-full max-h-full" ref={scrollElementRef}>
      <WindowScroller scrollElement={scrollElementRef .current ?? window}>
        {...}
      </WindowScroller>
    </div>
  );
};

roanrobersson avatar Jul 17 '24 19:07 roanrobersson