Skip to content
Data TableAPI Reference

Component union types

comins-table@0.2.2React

0.2.0: Types and helpers on this page use the React-state contract from the root comins-table entry. Neutral /core has a separate type contract. See the migration guide for imports and cell policies.

Public types composing built-in component configurations. Refer to the individual component dictionaries for options and narrow configurations using the type discriminator.

export type CominsComponentPrimitiveValue = string | number | boolean;

string, number or boolean values used by options, menus and virtual lists.

export type CominsComponentAlign = "center" | "end" | "start";

Component alignment: start, center or end.

export type CominsComponentDirection = "left" | "right";

Placement relative to cell content: left or right.

export type CominsHeaderComponentConfig<TData, TValue = unknown> = CominsButtonComponentConfig<CominsHeaderComponentPayload<TData, TValue>> | CominsInputComponentConfig<CominsHeaderComponentPayload<TData, TValue>> | CominsCheckboxComponentConfig<CominsHeaderComponentPayload<TData, TValue>> | CominsRadioComponentConfig<CominsHeaderComponentPayload<TData, TValue>> | CominsSelectComponentConfig<CominsHeaderComponentPayload<TData, TValue>> | CominsToggleComponentConfig<CominsHeaderComponentPayload<TData, TValue>> | CominsProgressComponentConfig<CominsHeaderComponentPayload<TData, TValue>> | CominsMenuComponentConfig<CominsHeaderComponentPayload<TData, TValue>>;

Union of button/input/checkbox/radio/select/toggle/progress/menu configurations using header payloads. virtual-list is not part of the header union.

export type CominsCellComponentConfig<TData, TValue = unknown> = CominsButtonComponentConfig<CominsCellComponentPayload<TData, TValue>> | CominsInputComponentConfig<CominsCellComponentPayload<TData, TValue>> | CominsCheckboxComponentConfig<CominsCellComponentPayload<TData, TValue>> | CominsRadioComponentConfig<CominsCellComponentPayload<TData, TValue>> | CominsSelectComponentConfig<CominsCellComponentPayload<TData, TValue>> | CominsToggleComponentConfig<CominsCellComponentPayload<TData, TValue>> | CominsProgressComponentConfig<CominsCellComponentPayload<TData, TValue>> | CominsVirtualListComponentConfig<CominsCellComponentPayload<TData, TValue>>;

Union of button/input/checkbox/radio/select/toggle/progress/virtual-list configurations using cell payloads. menu is not part of the cell union.