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

Function RemoteRowView

src/ui-solid/RemoteRowView.tsx:18–51  ·  view source on GitHub ↗
(props: RemoteRowProps)

Source from the content-addressed store, hash-verified

16import {RowView} from './RowView.tsx';
17
18export 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};

Callers

nothing calls this directly

Calls 3

useRemoteRowIdFunction · 0.90
contentFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…