Skip to content

ResizeController

Controller managing drag-based column resize lifecycle.

Exposed internally for plugins that need to interact with resize behavior.

import type { ResizeController, InternalGrid } from '@toolbox-web/grid';
class MyPlugin extends BaseGridPlugin {
handleColumnAction(colIndex: number): void {
const grid = this.grid as InternalGrid;
const resizeCtrl = grid._resizeController;
// Check if resize is in progress
if (resizeCtrl?.isResizing) {
return; // Don't interfere
}
// Reset column to configured width
resizeCtrl?.resetColumn(colIndex);
}
}
PropertyTypeDescription
start(e: MouseEvent, colIndex: number, cell: HTMLElement) => void
resetColumn(colIndex: number) => voidReset a column to its configured width (or auto-size if none configured).
dispose() => void
isResizingbooleanTrue while a resize drag is in progress (used to suppress header click/sort).
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt