({
localRowId,
params: [
idColumn,
cells,
localTableId,
remoteTableId,
relationshipId,
relationships,
store,
extraCellsBefore,
extraCellsAfter,
],
}: {
readonly localRowId: Id;
readonly params: RelationshipInHtmlRowParams;
})
| 31 | ); |
| 32 | |
| 33 | export const RelationshipInHtmlRow = ({ |
| 34 | localRowId, |
| 35 | params: [ |
| 36 | idColumn, |
| 37 | cells, |
| 38 | localTableId, |
| 39 | remoteTableId, |
| 40 | relationshipId, |
| 41 | relationships, |
| 42 | store, |
| 43 | extraCellsBefore, |
| 44 | extraCellsAfter, |
| 45 | ], |
| 46 | }: { |
| 47 | readonly localRowId: Id; |
| 48 | readonly params: RelationshipInHtmlRowParams; |
| 49 | }) => { |
| 50 | const remoteRowId = useRemoteRowId( |
| 51 | relationshipId, |
| 52 | localRowId, |
| 53 | relationships, |
| 54 | ) as Id; |
| 55 | const rowProps: RowProps = { |
| 56 | tableId: localTableId ?? '', |
| 57 | rowId: localRowId, |
| 58 | store, |
| 59 | }; |
| 60 | return ( |
| 61 | <tr> |
| 62 | {extraRowCells(extraCellsBefore, rowProps)} |
| 63 | {isFalse(idColumn) ? null : ( |
| 64 | <> |
| 65 | <th title={localRowId}>{localRowId}</th> |
| 66 | <th title={remoteRowId}>{remoteRowId}</th> |
| 67 | </> |
| 68 | )} |
| 69 | {objToArray( |
| 70 | cells, |
| 71 | ({component: CellView, getComponentProps}, compoundCellId) => { |
| 72 | const [tableId, cellId] = strSplit(compoundCellId, DOT, 2); |
| 73 | const rowId = |
| 74 | tableId === localTableId |
| 75 | ? localRowId |
| 76 | : tableId === remoteTableId |
| 77 | ? remoteRowId |
| 78 | : undefined; |
| 79 | return isUndefined(rowId) ? null : ( |
| 80 | <td key={compoundCellId}> |
| 81 | <CellView |
| 82 | {...getProps(getComponentProps, rowId, cellId)} |
| 83 | store={store} |
| 84 | tableId={tableId} |
| 85 | rowId={rowId} |
| 86 | cellId={cellId} |
| 87 | /> |
| 88 | </td> |
| 89 | ); |
| 90 | }, |
nothing calls this directly
no test coverage detected
searching dependent graphs…