TableState
Mutable state holder for a table instance. Manages column order/widths, sorting, filters and selection.
Properties
Whether automatic width fitting has been applied for the first data batch render.
Whether automatic width fitting has been applied for the empty (header-only) state.
Tracks the maximum measured minimal content width per column across visible rows. Used to auto-fit columns on demand.
Tracks header widths separately. These are preserved during auto-width recalculation and used as base values after reset.
Currently focused editable column, or null if not editing
Currently editing row index, or null if not editing
Callback when editing is cancelled
Callback for row edit completion validation. Returns true to allow exit, false to stay in edit mode.
Callback when row editing starts. Only called when item is non-null.
Tracks measured row heights in raw pixels for dynamic, precise scrolling.
Current table width computed from visible columns and their widths. Automatically recalculates when columnOrder, columnWidths, or visibleColumns change.
Functions
Cancel editing without validation. Calls onEditCancelled callback and clears edit state.
Complete editing the current cell and move to the next editable column. If no more editable columns in the row, attempts to complete row edit.
Recalculate auto-widths for columns with autoWidth enabled.
Resolves the effective width for a column given its key and optional spec.
Replace current column order with newOrder. Missing keys are ignored; unknown keys appended.
Apply external widths in bulk. Null width removes override for that column.
Set the column width override to the tracked maximum minimal content width (if available). No-op if no measured width is present for the column.
Start editing a specific row and column.
Toggle checkmark state for index in Multiple selection mode.
Check/uncheck all rows based on current count in Multiple selection mode.
Toggle row selection for index according to TableSettings.selectionMode.
Attempt to complete the current row edit. Calls onRowEditComplete callback to validate.
Record measured row height (in px) for index.