pivotick / GraphUI / TableColumn
Interface: TableColumn<T>
Defined in: interfaces/GraphUI.ts:1527
One column of the data dock.
Deliberately an extension of FilterFacet: a facet already says how to read a value off an element and what kind of value it is, which is exactly what a column needs. So declaring UI.filter.facets describes your data once and the filter panel and the table agree about it.
Example
{ key: 'severity', label: 'Severity', type: 'numberRange', align: 'right', filterable: true }Extends
Pick<FilterFacet,"key"|"label"|"type"|"order">
Type Parameters
T
Properties
accessor()?
optionalaccessor: (element) =>unknown
Defined in: interfaces/GraphUI.ts:1532
How to read this column off an element. Defaults to element.getData()[key], which is what makes a FilterFacet usable as a column unchanged.
Parameters
element
T
Returns
unknown
align?
optionalalign:"center"|"right"|"left"
Defined in: interfaces/GraphUI.ts:1536
Default
'right' for numberRange, 'left' otherwise
filterable?
optionalfilterable:boolean
Defined in: interfaces/GraphUI.ts:1552
Give this column a filter control in its header, typed off its type — a Min/Max pair for a numberRange, a dropdown of the values present for a select, a substring box otherwise.
It narrows the rows; the canvas is left alone unless someone presses the dock's Apply to graph button (see TableOptions.filterGraph), so reading and filtering stay separate acts.
Default
false for a column you declare — but true throughout the derived column set, which infers its filters off the types it already inferred. Declare columns and you get exactly what you asked for.
format()?
optionalformat: (value,element) =>string|HTMLElement
Defined in: interfaces/GraphUI.ts:1560
Render the cell. A string is inserted as text, an HTMLElement as markup. Ignored by export, which always writes the raw value.
Parameters
value
unknown
element
T
Returns
string | HTMLElement
Default
String(value)
hidden?
optionalhidden:boolean
Defined in: interfaces/GraphUI.ts:1554
Start hidden (still listed in the column picker).
Default
falsekey
key:
string
Defined in: interfaces/GraphQueryEngine.ts:73
Filter identity, and the GraphFilters key setFilter / getFilters use.
Inherited from
Pick.key
label?
optionallabel:string
Defined in: interfaces/GraphQueryEngine.ts:78
Human label for the form control, used verbatim (so it can be translated). Defaults to a prettified key.
Inherited from
Pick.label
order?
optionalorder:number
Defined in: interfaces/GraphQueryEngine.ts:99
Display order in the panel.
Default
declaration orderInherited from
Pick.order
sortable?
optionalsortable:boolean
Defined in: interfaces/GraphUI.ts:1538
Default
truetype
type:
FilterFacetType
Defined in: interfaces/GraphQueryEngine.ts:79
Inherited from
Pick.type
width?
optionalwidth:string|number
Defined in: interfaces/GraphUI.ts:1534
Column width — a pixel count, or any CSS length.
Default
sized from its content