Skip to content

onLayoutChange

GI-Gantt produces an event when a layout change is triggered from within GI-Gantt.

There are currently two events: column-resize and table-resize.

A callback can be passed to onLayoutChange prop to receive the events and data associated with the event.

export type ColumnSize = {
id: string;
width: number;
};
type OnLayoutChangeCallbackParams =
| {
event: "column-resize";
columnSizes: ColumnSize[];
}
| {
event: "table-resize";
width: number;
};
type OnLayoutChangeCallback = (params: OnLayoutChangeCallbackParams) => void;