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

Function ValuesInHtmlTable

src/ui-solid-dom/ValuesInHtmlTable.tsx:32–75  ·  view source on GitHub ↗
(
  props: ValuesInHtmlTableProps & HtmlTableProps,
)

Source from the content-addressed store, hash-verified

30 });
31
32export const ValuesInHtmlTable: typeof ValuesInHtmlTableDecl = (
33 props: ValuesInHtmlTableProps & HtmlTableProps,
34): JSXElement => {
35 const valueIds = useValueIds(() => props.store);
36 return (
37 <table class={props.className}>
38 {props.headerRow === false ? null : (
39 <thead>
40 <tr>
41 {extraHeaders(props.extraCellsBefore as any)}
42 {props.idColumn === false ? null : <th>Id</th>}
43 <th>{VALUE}</th>
44 {extraHeaders(props.extraCellsAfter as any)}
45 </tr>
46 </thead>
47 )}
48 <tbody>
49 {arrayMap(valueIds(), (valueId) => {
50 const valueProps = {valueId, store: props.store};
51 const Value =
52 props.valueComponent ??
53 (getValue(props.editable as any) === true
54 ? EditableValueView
55 : ValueView);
56 return (
57 <tr>
58 {extraValueCells(props.extraCellsBefore as any, valueProps)}
59 {isFalse(props.idColumn) ? null : (
60 <th title={valueId}>{valueId}</th>
61 )}
62 <td>
63 <Value
64 {...getProps(props.getValueComponentProps, valueId)}
65 {...valueProps}
66 />
67 </td>
68 {extraValueCells(props.extraCellsAfter as any, valueProps)}
69 </tr>
70 );
71 })}
72 </tbody>
73 </table>
74 );
75};

Callers

nothing calls this directly

Calls 7

useValueIdsFunction · 0.90
extraHeadersFunction · 0.90
arrayMapFunction · 0.90
getValueFunction · 0.90
isFalseFunction · 0.90
getPropsFunction · 0.90
extraValueCellsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…