API / Plugins / Base / Resize
ColumnResizePlugin
Constructor
new ColumnResizePlugin<T>(options?: ColumnResizePluginOptions<T>)Options
Properties accepted by ColumnResizePluginOptions<T>.
Callbacks
onResize: (columnId: string, width: number) => voidCalled with the column id and clamped width each time the width changes during a drag.
onResizeStart: (columnId: string, width: number) => voidCalled when a drag begins, with the column id and its starting width.
onResizeEnd: (columnId: string, width: number) => voidCalled when a drag completes, with the column id and its final width.
Instance methods
getColumnWidth(columnId): number | undefinedReturns the current width of a leaf column.
setColumnWidth(columnId, width): numberSets a column width and clamps it to the configured min/max constraints.
setWidth(columnId, width): numberAlias for `setColumnWidth`.
resizeColumn(columnId, delta): numberChanges the width by a delta in pixels.
resize(columnId, delta): numberAlias for `resizeColumn`.
beginResize(columnId, clientX): numberStarts an interactive resize using the pointer x-coordinate.
handlePointerDown(columnId, clientX): numberAdapter-friendly alias for pointer-down events.
resizeTo(clientX): numberUpdates the current resize using the new pointer x-coordinate.
handlePointerMove(clientX): numberAdapter-friendly alias for pointer-move events.
resizeBy(delta): numberUpdates the current resize using an already-calculated delta.
endResize(): numberCompletes the active pointer drag and hides the resize guide.
handleDoubleClick(columnId): numberAdapter-friendly alias for double-click auto-fit.
autoSizeColumn(columnId): numberCalculates the best-fit width from header text and visible row content.
autoFitColumn(columnId): numberAlias for `autoSizeColumn`.
getResizeGuide(): ColumnResizeGuideReturns the current drag guide state for integrations.
clearGuide(): voidResets the current drag guide state.
Types and Interfaces
ColumnResizeGuideLive drag-guide state for the currently resizing column.
interface ColumnResizeGuide {
/** ID of the column being resized. */
columnId: string;
/** Current pointer x-coordinate, in viewport pixels. */
x: number;
/** Whether the guide is currently visible. */
visible: boolean;
}ResizePluginOptionsAlias of {@link ColumnResizePluginOptions} with the `Column` prefix stripped for ergonomic construction.
type ResizePluginOptions<T> = ColumnResizePluginOptions<T>;