parseColumnShorthand
Since v0.7.0
Parse a column shorthand string into a React ColumnConfig.
Delegates parsing to @toolbox-web/grid core (issue #276). The result only
ever carries field/header/type, so it satisfies React’s widened column
type without a cast.
parseColumnShorthand(shorthand: string): ColumnConfig<TRow>Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
shorthand | string | The shorthand string (e.g., ‘name’, ‘salary:number’) |
Returns
Section titled “Returns”ColumnConfig<TRow> - A ColumnConfig object
Example
Section titled “Example”parseColumnShorthand('name') → { field: 'name', header: 'Name' }parseColumnShorthand('salary:number') → { field: 'salary', header: 'Salary', type: 'number' }AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://toolboxjs.com/llms-full.txt