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:const cols1 = ['id', 'name', 'email'];const cols2 = ['id:number', 'name:string', 'email'];const cols3 = [{ 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