Skip to content

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>>[]
NameTypeDescription
columnsColumnConfig<TRow, ColumnFieldKey<TRow>>[]Normalized columns to merge defaults into
defaultsPartial<ColumnConfig<TRow, ColumnFieldKey<TRow>>> | undefinedPartial column config applied as a baseline; pass undefined to no-op

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