MCPcopy Create free account
hub / github.com/OpenSIST/OpenSIST.github.io / handleSort

Function handleSort

src/Components/DataPoints/RecordTable.jsx:237–247  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

235 }, [filtered, grouped, insideProgramPage, sortKey, sortDir]);
236
237 const handleSort = (key) => {
238 if (sortKey !== key) {
239 setSortKey(key);
240 setSortDir("asc");
241 } else if (sortDir === "asc") {
242 setSortDir("desc");
243 } else {
244 setSortKey(null);
245 setSortDir(null);
246 }
247 };
248
249 const renderRow = (_index, row) => {
250 if (row.type === "group") {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected