applyColumnDefaults
Since v3.0.0
Apply column defaults to a list of columns. Individual column properties override defaults — the per-column value always wins over the default.
applyColumnDefaults(columns: ColumnConfig<TRow, ColumnFieldKey<TRow>>[], defaults: Partial<ColumnConfig<TRow, ColumnFieldKey<TRow>>> | undefined): ColumnConfig<TRow, ColumnFieldKey<TRow>>[]Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
columns | ColumnConfig<TRow, ColumnFieldKey<TRow>>[] | Normalized columns to merge defaults into |
defaults | Partial<ColumnConfig<TRow, ColumnFieldKey<TRow>>> | undefined | Partial column config applied as a baseline; pass undefined to no-op |
Returns
Section titled “Returns”ColumnConfig<TRow, ColumnFieldKey<TRow>>[] - A new array with the defaults merged in (input is not mutated)
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://toolboxjs.com/llms-full.txt