Resizing

The sizing logic underneath resizableColumns.

Last updated August 3, 2026

resolveColumnWidths and fitColumnsToWidth are the functions DataGridComponent calls internally when resizableColumns is enabled — the first resolves each column's width from its definition, the sizing state, and the grid's defaults, the second redistributes width across columns under resizeMode="fit". Reach for them directly if you're building a custom grid adapter.

Functions

FunctionTypeDescription
resolveColumnWidths(columns, sizing, options)readonly ResolvedColumn<Row>[]Resolves each column's rendered width from its definition, the sizing state, and the grid's defaults.
fitColumnsToWidth(columns, width, sizeDefaults)readonly ResolvedColumn<Row>[]Redistributes width across columns under resizeMode="fit".
clampColumnWidth(width, constraints)numberHolds a width within a column's min/max bounds.
resolveColumnConstraints(column, sizeDefaults)ColumnConstraintsThe min/max a column may be resized between.
beginColumnResize(column, startWidth, startPosition, sizeDefaults)ColumnResizeSessionOpens a resize: captures the column's constraints and starting point so applying a pointer position is arithmetic on numbers alone.
applyColumnResize(session, position)numberThe width the dragged column takes with the pointer at position.
sizeColumnToContent(measuredWidth, constraints)numberThe width a double-click auto-fit resolves to, clamped to the column's bounds.
totalColumnWidth(resolved)numberThe sum of every resolved column's width.

The same logic, in the React grid

resizableColumns

Live example
Resize mode
IdServiceEnvironment NameEnvironment RegionStatusCost
1checkout-apiproductionus-east-1healthy1240.5
2billing-workerproductioneu-west-1degraded860.2
3search-indexstagingus-east-1healthy92.75
4notificationsproductionus-west-2down305.4
5analytics-pipelinestagingeu-west-1healthy145
  1. Interact with the grid above to see its callbacks fire.
<DataGridComponent
  columns={columns}
  dataSource={rows}
  resizableColumns
  resizeMode="fit"
/>;
Edit this page on GitHub