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

Function handleSort

src/ui-solid-dom/SortedTablePaginator.tsx:48–57  ·  view source on GitHub ↗
(cellId: Id | undefined)

Source from the content-addressed store, hash-verified

46 getValue(onChange)?.(sortAndOffset);
47 };
48 const handleSort = (cellId: Id | undefined) => {
49 if (getValue(sortOnClick)) {
50 const [currentCellId, currentDescending, currentOffset] = sortAndOffset();
51 setStateAndChange([
52 cellId,
53 cellId == currentCellId ? !currentDescending : false,
54 currentOffset,
55 ]);
56 }
57 };
58 const handleChangeOffset = (offset: number) => {
59 const [currentCellId, currentDescending] = sortAndOffset();
60 setStateAndChange([currentCellId, currentDescending, offset]);

Callers

nothing calls this directly

Calls 3

getValueFunction · 0.90
setStateAndChangeFunction · 0.70
sortAndOffsetFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…