MCPcopy
hub / github.com/tinyplex/tinybase / EditableCellView

Function EditableCellView

src/ui-solid-dom/EditableCellView.tsx:11–30  ·  view source on GitHub ↗
(
  props: CellProps & {readonly className?: string; readonly showType?: boolean},
)

Source from the content-addressed store, hash-verified

9import {EDITABLE} from './common/index.tsx';
10
11export const EditableCellView: typeof EditableCellViewDecl = (
12 props: CellProps & {readonly className?: string; readonly showType?: boolean},
13): JSXElement => {
14 const [cell, setCell] = useCellState(
15 () => props.tableId,
16 () => props.rowId,
17 () => props.cellId,
18 () => props.store,
19 );
20 const store = useStoreOrStoreById(() => props.store);
21 return EditableThing({
22 get thing() {
23 return cell();
24 },
25 onThingChange: setCell,
26 class: props.className ?? EDITABLE + CELL,
27 showType: props.showType,
28 hasSchema: () => !!store()?.hasTablesSchema(),
29 });
30};

Callers

nothing calls this directly

Calls 5

useCellStateFunction · 0.90
useStoreOrStoreByIdFunction · 0.90
EditableThingFunction · 0.90
hasTablesSchemaMethod · 0.65
storeFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…