ColumnShorthand
Type for column shorthand notation.
Supports:
- Simple string:
'name'→{ field: 'name', header: 'Name' } - With type:
'salary:number'→{ field: 'salary', header: 'Salary', type: 'number' } - Full config object:
{ field: 'id', header: 'ID', width: 80 }(passed through)
type ColumnShorthand = string | ColumnConfig<TRow>Example
Section titled “Example”// All equivalent:columns={['id', 'name', 'email']}columns={['id:number', 'name:string', 'email']}columns={[{ field: 'id' }, { field: 'name' }, { field: 'email' }]}
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt