(
{
relationshipId,
relationships,
rowComponent: Row = RowView,
getRowComponentProps,
separator,
debugIds,
}: (RemoteRowProps | LocalRowsProps | LinkedRowsProps) & {
separator?: ReactElement | string;
},
getRowIdsHook: (
relationshipId: Id,
rowId: Id,
relationships: RelationshipsOrRelationshipsId | undefined,
) => Ids,
rowId: Id,
)
| 83 | ); |
| 84 | |
| 85 | export const useComponentPerRow = ( |
| 86 | { |
| 87 | relationshipId, |
| 88 | relationships, |
| 89 | rowComponent: Row = RowView, |
| 90 | getRowComponentProps, |
| 91 | separator, |
| 92 | debugIds, |
| 93 | }: (RemoteRowProps | LocalRowsProps | LinkedRowsProps) & { |
| 94 | separator?: ReactElement | string; |
| 95 | }, |
| 96 | getRowIdsHook: ( |
| 97 | relationshipId: Id, |
| 98 | rowId: Id, |
| 99 | relationships: RelationshipsOrRelationshipsId | undefined, |
| 100 | ) => Ids, |
| 101 | rowId: Id, |
| 102 | ) => { |
| 103 | const [resolvedRelationships, store, localTableId] = |
| 104 | getRelationshipsStoreTableIds( |
| 105 | useRelationshipsOrRelationshipsById(relationships), |
| 106 | relationshipId, |
| 107 | ); |
| 108 | const rowIds = getRowIdsHook(relationshipId, rowId, resolvedRelationships); |
| 109 | return ( |
| 110 | <Wrap separator={separator} debugIds={debugIds} id={rowId}> |
| 111 | {arrayMap(rowIds, (rowId) => ( |
| 112 | <Row |
| 113 | key={rowId} |
| 114 | {...getProps(getRowComponentProps, rowId)} |
| 115 | tableId={localTableId as Id} |
| 116 | rowId={rowId} |
| 117 | store={store} |
| 118 | debugIds={debugIds} |
| 119 | /> |
| 120 | ))} |
| 121 | </Wrap> |
| 122 | ); |
| 123 | }; |
| 124 | |
| 125 | export const getUseCheckpointView = |
| 126 | (getCheckpoints: (checkpointIds: CheckpointIds) => Ids) => |
no test coverage detected
searching dependent graphs…