PrivateAll columns to track in the ordering.
Backwards compatible usage (without ColumnVisibility):
New usage (with ColumnVisibility):
visibleColumns to indicate which are visibleOptionalexistingOrder?: Map<string, number>Optional: Previously saved column order to restore.
Optionalsave?: (order: Map<string, number>) => voidOptional: Callback to persist the column order (e.g., to localStorage).
OptionalvisibleColumns?: () => Record<string, boolean>Optional: Record of which columns are currently visible.
When provided, moveLeft/moveRight will skip over hidden columns.
When omitted, all columns from columns are treated as visible (backwards compatible).
Example when using ColumnVisibility:
visibleColumns: () => columns.reduce((acc, col) => {
acc[col.key] = meta(col).ColumnVisibility?.isVisible !== false;
return acc;
}, {})
PrivateargsAll columns to track in the ordering.
Backwards compatible usage (without ColumnVisibility):
New usage (with ColumnVisibility):
visibleColumns to indicate which are visibleOptionalexistingOrder?: Map<string, number>Optional: Previously saved column order to restore.
Optionalsave?: (order: Map<string, number>) => voidOptional: Callback to persist the column order (e.g., to localStorage).
OptionalvisibleColumns?: () => Record<string, boolean>Optional: Record of which columns are currently visible.
When provided, moveLeft/moveRight will skip over hidden columns.
When omitted, all columns from columns are treated as visible (backwards compatible).
Example when using ColumnVisibility:
visibleColumns: () => columns.reduce((acc, col) => {
acc[col.key] = meta(col).ColumnVisibility?.isVisible !== false;
return acc;
}, {})
This map will be empty until we re-order something.
The same as this.map, but with all the columns' information
PrivategetPrivateHelper to get visible columns, defaulting to all columns if not specified
To account for columnVisibilty, we need to:
To account for columnVisibilty, we need to:
Performs a swap of the column's position with the column at position
Used for keeping track of and updating column order