diff --git a/src/components/InfiniteTable/InfiniteTable.tsx b/src/components/InfiniteTable/InfiniteTable.tsx index 042cfd8..378e555 100644 --- a/src/components/InfiniteTable/InfiniteTable.tsx +++ b/src/components/InfiniteTable/InfiniteTable.tsx @@ -146,7 +146,7 @@ const InfiniteTableComp = forwardRef( const columns = useDeepArrayMemo(columnsProps, "key"); - const { applyColumnState } = useColumnState({ + const { applyColumnState, columnsPersistedStateRef } = useColumnState({ gridRef, containerRef, hasStatusColumn, @@ -281,6 +281,14 @@ const InfiniteTableComp = forwardRef( ], ); + console.log("-----"); + console.log("InfiniteTable render"); + console.log({ + internalState: gridRef.current?.api?.getColumnState(), + columnsPersistedStateRef: columnsPersistedStateRef.current, + }); + console.log("-----"); + const onGridReady = useCallback( (params: GridReadyEvent) => { params.api.setGridOption("datasource", { diff --git a/src/components/InfiniteTable/useColumnState.ts b/src/components/InfiniteTable/useColumnState.ts index 4c1f7ff..2a06270 100644 --- a/src/components/InfiniteTable/useColumnState.ts +++ b/src/components/InfiniteTable/useColumnState.ts @@ -105,5 +105,6 @@ export const useColumnState = ({ return { applyColumnState, + columnsPersistedStateRef, }; };