TinyBase logoTinyBase

SliceProps

SliceProps props are used for components that refer to a single Slice in an Index object, such as the SliceView component.

{
  indexId: Id;
  sliceId: Id;
  indexes?: IndexesOrIndexesId;
  rowComponent?: ComponentType<RowProps>;
  getRowComponentProps?: (rowId: Id) => ExtraProps;
  separator?: ReactElement | string;
  debugIds?: boolean;
}
TypeDescription
indexIdId

The Id of the Index in the Indexes object.

sliceIdId

The Id of the Slice in the Index to be rendered.

indexes?IndexesOrIndexesId

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

rowComponent?ComponentType<RowProps>

A component for rendering each Row in the Index.

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 Slice, and its descendent objects, to assist with debugging.