MCPcopy Create free account
hub / github.com/MADEVAL/Oat-Table / #applyInitialSort

Method #applyInitialSort

src/table.js:108–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106 }
107
108 #applyInitialSort() {
109 const active = this.#headers.find(header => ['ascending', 'descending'].includes(header.getAttribute('aria-sort')));
110 if (!active) {
111 return;
112 }
113
114 this.#sortBy(active, active.getAttribute('aria-sort'), false);
115 }
116
117 #sortBy(header, forcedDirection, emit = true) {
118 const column = Array.from(header.parentElement.cells).indexOf(header);

Callers 1

#initMethod · 0.95

Calls 1

#sortByMethod · 0.95

Tested by

no test coverage detected