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

Function QueryView

src/ui-solid-inspector/index.tsx:886–920  ·  view source on GitHub ↗
(
  props: {
    readonly queries: any;
    readonly queriesId?: Id;
    readonly queryId: Id;
  } & StoreProp,
)

Source from the content-addressed store, hash-verified

884};
885
886const QueryView = (
887 props: {
888 readonly queries: any;
889 readonly queriesId?: Id;
890 readonly queryId: Id;
891 } & StoreProp,
892) => {
893 const uniqueId = getUniqueId('q', props.queriesId, props.queryId);
894 const sort = useCell(STATE_TABLE, uniqueId, SORT_CELL, props.s);
895 const sortProps = createMemo(
896 () => jsonParse((sort() as string) ?? '[]') as [Id, boolean, number],
897 );
898 const handleChange = useSetCellCallback(
899 STATE_TABLE,
900 uniqueId,
901 SORT_CELL,
902 jsonStringWithMap,
903 props.s,
904 );
905 return (
906 <Details uniqueId={uniqueId} title={'Query: ' + props.queryId} s={props.s}>
907 <ResultSortedTableInHtmlTable
908 queryId={props.queryId}
909 queries={props.queries}
910 cellId={sortProps()[0]}
911 descending={sortProps()[1]}
912 offset={sortProps()[2]}
913 limit={10}
914 paginator={true}
915 sortOnClick={true}
916 onChange={handleChange}
917 />
918 </Details>
919 );
920};
921
922const QueriesView = (props: {readonly queriesId?: Id} & StoreProp) => {
923 const queries = useQueries(props.queriesId);

Callers

nothing calls this directly

Calls 3

getUniqueIdFunction · 0.90
useCellFunction · 0.90
useSetCellCallbackFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…