()
| 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); |