Skip to content

Commit

Permalink
Merge branch 'feat/user-view-prefs' into alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
mguellsegarra committed Jul 31, 2024
2 parents d6c1b05 + cf15324 commit 66ff0d5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/InfiniteTable/InfiniteTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const InfiniteTableComp = forwardRef<InfiniteTableRef, InfiniteTableProps>(

const columns = useDeepArrayMemo(columnsProps, "key");

const { applyColumnState } = useColumnState({
const { applyColumnState, columnsPersistedStateRef } = useColumnState({
gridRef,
containerRef,
hasStatusColumn,
Expand Down Expand Up @@ -281,6 +281,14 @@ const InfiniteTableComp = forwardRef<InfiniteTableRef, InfiniteTableProps>(
],
);

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", {
Expand Down
1 change: 1 addition & 0 deletions src/components/InfiniteTable/useColumnState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,6 @@ export const useColumnState = ({

return {
applyColumnState,
columnsPersistedStateRef,
};
};

0 comments on commit 66ff0d5

Please sign in to comment.