refactor: Update TableComponent to call onGridReady after setting column state change flag

This commit is contained in:
anovazzi1 2024-06-10 18:06:30 -03:00
commit 6918fadaed

View file

@ -97,7 +97,6 @@ const TableComponent = forwardRef<
applyOrder: true, applyOrder: true,
}); });
} }
if (props.onGridReady) props.onGridReady(params);
setTimeout(() => { setTimeout(() => {
if (customInit && realRef.current) { if (customInit && realRef.current) {
setColumnStateChange(true); setColumnStateChange(true);
@ -108,6 +107,7 @@ const TableComponent = forwardRef<
setTimeout(() => { setTimeout(() => {
realRef.current.api.hideOverlay(); realRef.current.api.hideOverlay();
}, 1000); }, 1000);
if (props.onGridReady) props.onGridReady(params);
}; };
const onColumnMoved = (params) => { const onColumnMoved = (params) => {
const updatedColumnDefs = makeLastColumnNonResizable( const updatedColumnDefs = makeLastColumnNonResizable(