Row Interface
A row in a table.
For more information about our API support guarantees, see here.
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 Row<TCell extends ImplicitAllowedTypes, TProps extends ImplicitFieldSchema = ImplicitFieldSchema>
Type Parameters
| Parameter | Constraint | Default | Description |
|---|---|---|---|
| TCell | ImplicitAllowedTypes | The type of the cells in the Table. | |
| TProps | ImplicitFieldSchema | ImplicitFieldSchema | Additional properties to associate with the row. |
Remarks
Implemented by the schema class returned from row(params).
Properties
| Property | Alerts | Modifiers | Type | Description |
|---|---|---|---|---|
| id | Alpha |
readonly |
string | The unique identifier of the row. |
| props | Alpha |
TreeFieldFromImplicitField<TProps> | The row's properties. |
Methods
| Method | Alerts | Return Type | Description |
|---|---|---|---|
| getCell(column) | Alpha |
TreeNodeFromImplicitAllowedTypes<TCell> | undefined | Gets the cell in the specified column. |
| getCell(columnId) | Alpha |
TreeNodeFromImplicitAllowedTypes<TCell> | undefined | Gets the cell in the specified column, denoted by column ID. |
| getCells() | Alpha |
readonly { columnId: string; cell: TreeNodeFromImplicitAllowedTypes<TCell>; }[] | Gets all of the populated cells in the row, keyed by their associated column IDs. |
| removeCell(column) | Alpha |
TreeNodeFromImplicitAllowedTypes<TCell> | undefined | Removes the cell in the specified column. |
| removeCell(columnId) | Alpha |
TreeNodeFromImplicitAllowedTypes<TCell> | undefined | Removes the cell in the specified column, denoted by column ID. |
| setCell(column, value) | Alpha |
void | Sets the cell in the specified column. |
| setCell(columnId, value) | Alpha |
void | Sets the cell in the specified column, denoted by column ID. |
Property Details
id
The unique identifier of the row.
For more information about our API support guarantees, see here.
Signature
readonly id: string;
Type: string
Remarks
Uniquely identifies the node within the entire tree, not just the table.
props
The row's properties.
For more information about our API support guarantees, see here.
Signature
get props(): TreeFieldFromImplicitField<TProps>;
set props(value: InsertableTreeFieldFromImplicitField<TProps>);
Type: TreeFieldFromImplicitField<TProps>
Remarks
This is a user-defined schema that can be used to store additional information about the row.
Method Details
getCell
Gets the cell in the specified column.
For more information about our API support guarantees, see here.
Signature
getCell(column: Column<TCell>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
Parameters
| Parameter | Type | Description |
|---|---|---|
| column | Column<TCell> |
Returns
The cell if it exists, otherwise undefined.
Return type: TreeNodeFromImplicitAllowedTypes<TCell> | undefined
getCell
Gets the cell in the specified column, denoted by column ID.
For more information about our API support guarantees, see here.
Signature
getCell(columnId: string): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
Parameters
| Parameter | Type | Description |
|---|---|---|
| columnId | string |
Returns
The cell if it exists, otherwise undefined.
Return type: TreeNodeFromImplicitAllowedTypes<TCell> | undefined
getCells
Gets all of the populated cells in the row, keyed by their associated column IDs.
For more information about our API support guarantees, see here.
Signature
getCells(): readonly {
columnId: string;
cell: TreeNodeFromImplicitAllowedTypes<TCell>;
}[];
Returns
Return type: readonly { columnId: string; cell: TreeNodeFromImplicitAllowedTypes<TCell>; }[]
removeCell
Removes the cell in the specified column.
For more information about our API support guarantees, see here.
Signature
removeCell(column: Column<TCell>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
Parameters
| Parameter | Type | Description |
|---|---|---|
| column | Column<TCell> |
Returns
The cell if it exists, otherwise undefined.
Return type: TreeNodeFromImplicitAllowedTypes<TCell> | undefined
removeCell
Removes the cell in the specified column, denoted by column ID.
For more information about our API support guarantees, see here.
Signature
removeCell(columnId: string): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
Parameters
| Parameter | Type | Description |
|---|---|---|
| columnId | string |
Returns
The cell if it exists, otherwise undefined.
Return type: TreeNodeFromImplicitAllowedTypes<TCell> | undefined
setCell
Sets the cell in the specified column.
For more information about our API support guarantees, see here.
Signature
setCell(column: Column<TCell>, value: InsertableTreeNodeFromImplicitAllowedTypes<TCell>): void;
Remarks
To remove a cell, call removeCell(column) instead.
Parameters
| Parameter | Type | Description |
|---|---|---|
| column | Column<TCell> | |
| value | InsertableTreeNodeFromImplicitAllowedTypes<TCell> |
setCell
Sets the cell in the specified column, denoted by column ID.
For more information about our API support guarantees, see here.
Signature
setCell(columnId: string, value: InsertableTreeNodeFromImplicitAllowedTypes<TCell>): void;
Remarks
To remove a cell, call removeCell(columnId) instead.
Parameters
| Parameter | Type | Description |
|---|---|---|
| columnId | string | |
| value | InsertableTreeNodeFromImplicitAllowedTypes<TCell> |