(props: RemoteRowProps)
| 16 | import {RowView} from './RowView.tsx'; |
| 17 | |
| 18 | export const RemoteRowView = (props: RemoteRowProps): JSXElement => { |
| 19 | const resolvedRelationships = useRelationshipsOrRelationshipsById( |
| 20 | () => props.relationships, |
| 21 | ); |
| 22 | const rowId = useRemoteRowId( |
| 23 | () => props.relationshipId, |
| 24 | () => props.localRowId, |
| 25 | resolvedRelationships, |
| 26 | ); |
| 27 | const content = () => { |
| 28 | const Row = props.rowComponent ?? RowView; |
| 29 | const [_relationshipsValue, store, , remoteTableId] = |
| 30 | getRelationshipsStoreTableIds( |
| 31 | getValue(resolvedRelationships), |
| 32 | props.relationshipId, |
| 33 | ); |
| 34 | const remoteRowId = getValue(rowId) as Id | undefined; |
| 35 | return wrap( |
| 36 | isUndefined(remoteTableId) || isUndefined(remoteRowId) ? null : ( |
| 37 | <Row |
| 38 | {...getProps(props.getRowComponentProps, remoteRowId as Id)} |
| 39 | tableId={remoteTableId} |
| 40 | rowId={remoteRowId} |
| 41 | store={store} |
| 42 | debugIds={props.debugIds} |
| 43 | /> |
| 44 | ), |
| 45 | undefined, |
| 46 | props.debugIds, |
| 47 | props.localRowId, |
| 48 | ); |
| 49 | }; |
| 50 | return <>{content()}</>; |
| 51 | }; |
nothing calls this directly
no test coverage detected
searching dependent graphs…