()
| 90 | } |
| 91 | |
| 92 | #setupSelection() { |
| 93 | this.#selectAll?.addEventListener('change', () => this.#toggleVisibleRows(this.#selectAll.checked), { signal: this.#controller.signal }); |
| 94 | |
| 95 | this.#table.addEventListener('change', event => { |
| 96 | const checkbox = event.target.closest('[data-table-select-row]'); |
| 97 | if (!checkbox) { |
| 98 | return; |
| 99 | } |
| 100 | |
| 101 | const row = checkbox.closest('tr'); |
| 102 | row?.toggleAttribute('data-selected', checkbox.checked); |
| 103 | this.#syncSelection(); |
| 104 | this.#emitSelection(); |
| 105 | }, { signal: this.#controller.signal }); |
| 106 | } |
| 107 | |
| 108 | #applyInitialSort() { |
| 109 | const active = this.#headers.find(header => ['ascending', 'descending'].includes(header.getAttribute('aria-sort'))); |
no test coverage detected