TinyBase logoTinyBase

ResultSortedTableProps

ResultSortedTableProps props are used for components that refer to a single sorted query ResultTable, such as the ResultSortedTableView component.

{
  queryId: Id;
  cellId?: Id;
  descending?: boolean;
  offset?: number;
  limit?: number;
  queries?: QueriesOrQueriesId;
  resultRowComponent?: ComponentType<ResultRowProps>;
  getResultRowComponentProps?: (rowId: Id) => ExtraProps;
  separator?: ReactElement | string;
  debugIds?: boolean;
}
TypeDescription
queryIdId

The Id of the query in the Queries object for which the sorted ResultTable will 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.

queries?QueriesOrQueriesId

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

resultRowComponent?ComponentType<ResultRowProps>

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

getResultRowComponentProps?(rowId: Id) => ExtraProps

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

separator?ReactElement | string

A component or string to separate each Row component.

debugIds?boolean

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

Since

v2.0.0