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

Function SortedTableInHtmlTable

src/ui-react-dom/SortedTableInHtmlTable.tsx:21–67  ·  view source on GitHub ↗
({
  tableId,
  cellId,
  descending,
  offset,
  limit,
  store,
  editable,
  sortOnClick,
  paginator = false,
  onChange,
  customCells,
  extraCellsBefore,
  extraCellsAfter,
  ...props
}: SortedTableInHtmlTableProps & HtmlTableProps)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

useSortingAndPaginationFunction · 0.90
useRowCountFunction · 0.90
useParamsFunction · 0.90
useCellsFunction · 0.90
useTableCellIdsFunction · 0.90
useSortedRowIdsFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…