TinyBase logoTinyBase

SortedTableProps

SortedTableProps props are used for components that refer to a single sorted Table in a Store, such as the SortedTableView component.

{
  tableId: Id;
  cellId?: Id;
  descending?: boolean;
  offset?: number;
  limit?: number;
  store?: StoreOrStoreId;
  rowComponent?: ComponentType<RowProps>;
  getRowComponentProps?: (rowId: Id) => ExtraProps;
  customCellIds?: Ids;
  separator?: ReactElement | string;
  debugIds?: boolean;
}
TypeDescription
tableIdId

The Id of the Table in the Store to be rendered.

cellId?Id

The Id of the Cell whose values are used for the sorting. If omitted, the view will sort the Row Id itself.

descending?boolean

Whether the sorting should be in descending order.

offset?number

The number of Row Ids to skip for pagination purposes.

limit?number

The maximum number of Row Ids to return.

store?StoreOrStoreId

The Store to be accessed: omit for the default context Store, provide an Id for a named context Store, or provide an explicit reference.

rowComponent?ComponentType<RowProps>

A custom component for rendering each Row in the Table (to override the default RowView component).

getRowComponentProps?(rowId: Id) => ExtraProps

A function for generating extra props for each custom Row component based on its Id.

customCellIds?Ids

An optional list of Cell Ids to use for rendering a prescribed set of the sorted Table's Cells in a given order.

separator?ReactElement | string

A component or string to separate each Row component.

debugIds?boolean

Whether the component should also render the Id of the Table, and its descendent objects, to assist with debugging.

Since

v2.0.0