I am having issues to access recomputeGridSize() public method from Multigrid component with refs in React functional ccomponent.
I checked this issue https://github.com/bvaughn/react-virtualized/issues/136 but solution from there does not work for me and i am still getting undefined.
In short hand my code looks something like this:
`
import { MultiGrid } from 'react-virtualized';
I tried to access this method as multiGridRef.recomputeGridSize() and multiGridRef.current.recomputeGridSize() but both are undefined.
I really need help about this!
Thanks in advance!
I am having issues to access recomputeGridSize() public method from Multigrid component with refs in React functional ccomponent. I checked this issue https://github.com/bvaughn/react-virtualized/issues/136 but solution from there does not work for me and i am still getting undefined. In short hand my code looks something like this: ` import { MultiGrid } from 'react-virtualized';
const SomeComponent=()=>{ const multiGridRef = useRef(); return ( <MultiGrid onScroll={handleScroll} width={headerRef?.current?.offsetWidth || 0} height={multiGridHeight + 10} fixedColumnCount={ stickyColumnsCount || stickyColumns.length } rowHeight={ROW_HEIGHT} columnWidth={(index) => table.visibleColumns[index.index]?.totalFlexWidth || 0 } cellRenderer={renderCell} rowCount={table.rows.length} columnCount={visibleColumnsCount} ref={multiGridRef} /> ); } ` If i console.log() multiGridRef?.current i will get:
I tried to access this method as multiGridRef.recomputeGridSize() and multiGridRef.current.recomputeGridSize() but both are undefined. I really need help about this! Thanks in advance!