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 0345747 + cd51e63 commit 59c37a6
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/components/InfiniteTable/InfiniteTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,14 @@ const InfiniteTableComp = forwardRef<InfiniteTableRef, InfiniteTableProps>(
[onColumnsChangedProps],
);

const onColumnChanged = useCallback(() => {
const state = gridRef?.current?.api.getColumnState();
debouncedOnColumnChanged(state);
}, [debouncedOnColumnChanged]);
const onColumnChanged = useCallback(
(e: any) => {
console.log({ e });
const state = gridRef?.current?.api.getColumnState();
debouncedOnColumnChanged(state);
},
[debouncedOnColumnChanged],
);

useImperativeHandle(ref, () => ({
unselectAll: () => {
Expand Down Expand Up @@ -331,7 +335,8 @@ const InfiniteTableComp = forwardRef<InfiniteTableRef, InfiniteTableProps>(
suppressRowClickSelection={true}
rowBuffer={0}
rowSelection={"multiple"}
onColumnMoved={onColumnChanged}
// onDragStopped={onColumnChanged}
// onColumnMoved={onColumnChanged}
onColumnResized={onColumnChanged}
rowModelType={"infinite"}
cacheBlockSize={20}
Expand Down

0 comments on commit 59c37a6

Please sign in to comment.