MCPcopy Index your code
hub / github.com/tinyplex/tinybase / RemoteRowView

Function RemoteRowView

src/ui-react/RemoteRowView.tsx:12–44  ·  view source on GitHub ↗
({
  relationshipId,
  localRowId,
  relationships,
  rowComponent: Row = RowView,
  getRowComponentProps,
  debugIds,
}: RemoteRowProps)

Source from the content-addressed store, hash-verified

10import {RowView} from './RowView.tsx';
11
12export const RemoteRowView: typeof RemoteRowViewDecl = ({
13 relationshipId,
14 localRowId,
15 relationships,
16 rowComponent: Row = RowView,
17 getRowComponentProps,
18 debugIds,
19}: RemoteRowProps): any => {
20 const [resolvedRelationships, store, , remoteTableId] =
21 getRelationshipsStoreTableIds(
22 useRelationshipsOrRelationshipsById(relationships),
23 relationshipId,
24 );
25 const rowId = useRemoteRowId(
26 relationshipId,
27 localRowId,
28 resolvedRelationships,
29 );
30 return (
31 <Wrap debugIds={debugIds} id={localRowId}>
32 {isUndefined(remoteTableId) || isUndefined(rowId) ? null : (
33 <Row
34 key={rowId}
35 {...getProps(getRowComponentProps, rowId as Id)}
36 tableId={remoteTableId}
37 rowId={rowId}
38 store={store}
39 debugIds={debugIds}
40 />
41 )}
42 </Wrap>
43 );
44};

Callers

nothing calls this directly

Calls 5

useRemoteRowIdFunction · 0.90
isUndefinedFunction · 0.90
getPropsFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…