@jimka/typescript-ui / component/table / Column
Class: Column
Defined in: src/typescript/lib/component/table/Column.ts:17
Resolved presentation descriptor for a single table column.
Created internally by Column.resolve — not constructed directly by application code. Wraps a Field and carries optional width constraints and an initial visibility flag derived from a ColumnSpec.
Re-exported as TableColumn from the package barrel.
Constructors
new Column()
new Column(field: Field, config?: ColumnConfig): ColumnDefined in: src/typescript/lib/component/table/Column.ts:31
Constructs a Column from a field and an optional presentation config.
Parameters
field
The model field this column represents.
config?
Optional config; all constraint properties default to absent / false.
Returns
Methods
clearHeaderGlyph()
clearHeaderGlyph(): thisDefined in: src/typescript/lib/component/table/Column.ts:103
Clears the header glyph for this column. Equivalent to setHeaderGlyph(null).
Returns
this
This column, for method chaining.
getField()
getField(): FieldDefined in: src/typescript/lib/component/table/Column.ts:44
Returns the model field this column represents.
Returns
The underlying Field.
getHeaderGlyph()
getHeaderGlyph(): null | stringDefined in: src/typescript/lib/component/table/Column.ts:80
Returns the registry glyph name shown to the left of this column's header text.
Returns
null | string
The glyph registry name, or null if no header glyph is set.
getMaxWidth()
getMaxWidth(): undefined | numberDefined in: src/typescript/lib/component/table/Column.ts:62
Returns the maximum column width in pixels declared in the spec.
Returns
undefined | number
The maximum width, or undefined if unconstrained.
getMinWidth()
getMinWidth(): undefined | numberDefined in: src/typescript/lib/component/table/Column.ts:53
Returns the minimum column width in pixels declared in the spec.
Returns
undefined | number
The minimum width, or undefined if unconstrained.
isInitiallyHidden()
isInitiallyHidden(): booleanDefined in: src/typescript/lib/component/table/Column.ts:71
Returns whether this column starts hidden according to the spec.
Returns
boolean
true if the spec declared hidden: true for this column.
setHeaderGlyph()
setHeaderGlyph(name: null | string): thisDefined in: src/typescript/lib/component/table/Column.ts:92
Sets the registry glyph name shown to the left of this column's header text.
Pass null (or call Column.clearHeaderGlyph) to remove the glyph.
Parameters
name
A registered glyph name, or null to remove.
null | string
Returns
this
This column, for method chaining.
resolve()
static resolve(fields: Field[], spec?: ColumnSpec): Column[]Defined in: src/typescript/lib/component/table/Column.ts:127
Resolves a ColumnSpec against a set of model fields into an ordered array of Column instances.
When no spec is provided every field becomes a default Column, preserving existing table behaviour exactly.
When a spec is provided:
- Fields listed in
spec.columnsreceive their declared constraints. - Fields not listed are appended as default Columns when
appendUnlistedistrue(the default), or omitted entirely when it isfalse.
The returned array is sorted by Field.getOrder so that the column sequence matches the order used by the header and body renderers.
Parameters
fields
Field[]
All fields returned by the model.
spec?
Optional column spec; omit to auto-generate from all fields.
Returns
Column[]
Resolved Column instances in display order.