Skip to content

Commit

Permalink
refactor: recalculate column widths also in layout effect
Browse files Browse the repository at this point in the history
  • Loading branch information
vursen committed Nov 19, 2024
1 parent 33625f3 commit 91499bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-components/src/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function Grid<TItem = GridDefaultItem>(
};
}, []);

useEffect(() => {
useLayoutEffect(() => {
if (pendingRecalculateColumnWidthsCall) {
const gridElement = innerRef.current!;
const gridProto = Object.getPrototypeOf(gridElement);
Expand Down

0 comments on commit 91499bd

Please sign in to comment.