TinyBase logoTinyBase

IndexProps

IndexProps props are used for components that refer to a single Index in an Indexes object, such as the IndexView component.

{
  indexId: Id;
  indexes?: IndexesOrIndexesId;
  sliceComponent?: ComponentType<SliceProps>;
  getSliceComponentProps?: (sliceId: Id) => ExtraProps;
  separator?: ReactElement | string;
  debugIds?: boolean;
}
TypeDescription
indexIdId

The Id of the Index in the Indexes object 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.

sliceComponent?ComponentType<SliceProps>

A component for rendering each Slice in the Index.

getSliceComponentProps?(sliceId: Id) => ExtraProps

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

separator?ReactElement | string

A component or string to separate each Slice component.

debugIds?boolean

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

Since

v1.0.0