TinyBase logoTinyBase β

useSliceRowIds

The useSliceRowIds hook returns a reactive object reflecting the Ids of the Rows in a Slice, and registers a listener so that any changes will update .current.

useSliceRowIds(
  indexId: MaybeGetter<string>,
  sliceId: MaybeGetter<string>,
  indexesOrIndexesId?: MaybeGetter<undefined | IndexesOrIndexesId>,
): {current: Ids}
TypeDescription
indexIdMaybeGetter<string>

The Id of the Index (or a getter returning it).

sliceIdMaybeGetter<string>

The Id of the Slice (or a getter returning it).

indexesOrIndexesId?MaybeGetter<undefined | IndexesOrIndexesId>

The Indexes object to use (plain or getter), or its Id.

returns{current: Ids}

A reactive object with a current Ids property.

Since

v8.1.0