Skip to main content

Column Interface

A column in a table.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature

/** @sealed */
interface Column<TCell extends ImplicitAllowedTypes, TProps extends ImplicitAnnotatedFieldSchema = ImplicitAnnotatedFieldSchema>

Type Parameters

Parameter Constraint Default Description
TCell ImplicitAllowedTypes The type of the cells in the Table.
TProps ImplicitAnnotatedFieldSchema ImplicitAnnotatedFieldSchema Additional properties to associate with the column.

Remarks

Implemented by the schema class returned from column(params).

Properties

Property Alerts Modifiers Type Description
id Alpha readonly string The unique identifier of the column.
props Alpha TreeFieldFromImplicitField<UnannotateImplicitFieldSchema<TProps>> The column's properties.

Methods

Method Alerts Return Type Description
getCells() Alpha readonly { rowId: string; cell: TreeNodeFromImplicitAllowedTypes<TCell>; }[] Gets all of the populated cells in the column, keyed by their associated row IDs.

Property Details

id

The unique identifier of the column.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
readonly id: string;

Type: string

Remarks

Uniquely identifies the node within the entire tree, not just the table.

props

The column's properties.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
get props(): TreeFieldFromImplicitField<UnannotateImplicitFieldSchema<TProps>>;
set props(value: InsertableTreeFieldFromImplicitField<UnannotateImplicitFieldSchema<TProps>>);

Type: TreeFieldFromImplicitField<UnannotateImplicitFieldSchema<TProps>>

Remarks

This is a user-defined schema that can be used to store additional information about the column.

Method Details

getCells

Gets all of the populated cells in the column, keyed by their associated row IDs.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
getCells(): readonly {
rowId: string;
cell: TreeNodeFromImplicitAllowedTypes<TCell>;
}[];

Returns

Return type: readonly { rowId: string; cell: TreeNodeFromImplicitAllowedTypes<TCell>; }[]

Error Handling

Throws an error if the column is not in a table.