You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having issues to access recomputeGridSize() public method from Multigrid component with refs in React functional ccomponent.
I checked this issue #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!
The text was updated successfully, but these errors were encountered:
I am having issues to access recomputeGridSize() public method from Multigrid component with refs in React functional ccomponent.
I checked this issue #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!
The text was updated successfully, but these errors were encountered: