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

Function SortedTableInHtmlTable

src/ui-solid-dom/SortedTableInHtmlTable.tsx:24–68  ·  view source on GitHub ↗
(
  props: SortedTableInHtmlTableProps & HtmlTableProps,
)

Source from the content-addressed store, hash-verified

22import {useSortingAndPagination} from './SortedTablePaginator.tsx';
23
24export const SortedTableInHtmlTable: typeof SortedTableInHtmlTableDecl = (
25 props: SortedTableInHtmlTableProps & HtmlTableProps,
26): JSXElement => {
27 const [sortAndOffset, handleSort, paginatorComponent] =
28 useSortingAndPagination(
29 () => props.cellId,
30 () => props.descending,
31 () => props.sortOnClick,
32 () => props.offset,
33 () => props.limit,
34 useRowCount(
35 () => props.tableId,
36 () => props.store,
37 ),
38 () => props.paginator ?? false,
39 () => props.onChange,
40 );
41 return HtmlTable({
42 ...props,
43 params: getParams(
44 useCells(
45 useTableCellIds(
46 () => props.tableId,
47 () => props.store,
48 ),
49 () => props.customCells,
50 () => (props.editable === true ? EditableCellView : CellView),
51 ),
52 getStoreCellComponentProps(props.store, props.tableId),
53 useSortedRowIds(
54 () => props.tableId,
55 () => sortAndOffset()[0],
56 () => sortAndOffset()[1],
57 () => sortAndOffset()[2],
58 () => props.limit,
59 () => props.store,
60 ),
61 props.extraCellsBefore,
62 props.extraCellsAfter,
63 sortAndOffset,
64 handleSort,
65 paginatorComponent,
66 ),
67 });
68};

Callers

nothing calls this directly

Calls 9

useSortingAndPaginationFunction · 0.90
useRowCountFunction · 0.90
HtmlTableFunction · 0.90
getParamsFunction · 0.90
useCellsFunction · 0.90
useTableCellIdsFunction · 0.90
useSortedRowIdsFunction · 0.90
sortAndOffsetFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…