TinyBase logoTinyBase

LocalRowsProps

LocalRowsProps props are used for components that refer to a single Relationship in a Relationships object, and where you want to render local Rows based on a remote Row, such as the LocalRowsView component.

{
  relationshipId: Id;
  remoteRowId: Id;
  relationships?: RelationshipsOrRelationshipsId;
  rowComponent?: ComponentType<RowProps>;
  getRowComponentProps?: (rowId: Id) => ExtraProps;
  separator?: ReactElement | string;
  debugIds?: boolean;
}
TypeDescription
relationshipIdId

The Id of the Relationship in the Relationships object.

remoteRowIdId

The Id of the remote Row for which to render the local Rows.

relationships?RelationshipsOrRelationshipsId

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

rowComponent?ComponentType<RowProps>

A component for rendering each (remote, local, or linked) Row in the Relationship.

getRowComponentProps?(rowId: Id) => ExtraProps

A function for generating extra props for each 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 Row in the Relationship, and its descendent objects, to assist with debugging.