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 c86ec1a + d4c9c36 commit 7973bdf
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/components/InfiniteTable/InfiniteTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
ColumnMovedEvent,
ColumnResizedEvent,
ColumnState,
DragStoppedEvent,
FirstDataRenderedEvent,
GridReadyEvent,
IGetRowsParams,
Expand Down Expand Up @@ -102,8 +103,12 @@ const InfiniteTableComp = forwardRef<InfiniteTableRef, InfiniteTableProps>(
);

const onColumnChanged = useCallback(
(e: any) => {
console.log({ e });
(event: DragStoppedEvent | ColumnResizedEvent) => {
// if (!event.finished) {
// return;
// }
// const et = event.source === "uiColumnResized";
console.log({ event });
const state = gridRef?.current?.api.getColumnState();
debouncedOnColumnChanged(state);
},
Expand Down Expand Up @@ -335,7 +340,7 @@ const InfiniteTableComp = forwardRef<InfiniteTableRef, InfiniteTableProps>(
suppressRowClickSelection={true}
rowBuffer={0}
rowSelection={"multiple"}
// onDragStopped={onColumnChanged}
onDragStopped={onColumnChanged}
// onColumnMoved={onColumnChanged}
onColumnResized={onColumnChanged}
rowModelType={"infinite"}
Expand Down

0 comments on commit 7973bdf

Please sign in to comment.