TinyBase logoTinyBase

TableProps

TableProps props are used for components that refer to a single Table in a Store, such as the TableView component.

{
  tableId: Id;
  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.

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 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.