TinyBase logoTinyBase β

useLinkedRowIds

The useLinkedRowIds hook returns a reactive object reflecting the linked Row Ids in a Relationship, and registers a listener so that any changes will update .current.

useLinkedRowIds(
  relationshipId: MaybeGetter<string>,
  firstRowId: MaybeGetter<string>,
  relationshipsOrRelationshipsId?: MaybeGetter<undefined | RelationshipsOrRelationshipsId>,
): {current: Ids}
TypeDescription
relationshipIdMaybeGetter<string>

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

firstRowIdMaybeGetter<string>

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

relationshipsOrRelationshipsId?MaybeGetter<undefined | RelationshipsOrRelationshipsId>

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

returns{current: Ids}

A reactive object with a current Ids property.

Since

v8.1.0