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

Method #syncEmptyRow

src/table.js:200–218  ·  view source on GitHub ↗
(visible)

Source from the content-addressed store, hash-verified

198 }
199
200 #syncEmptyRow(visible) {
201 if (visible > 0) {
202 this.#emptyRow?.remove();
203 this.#emptyRow = null;
204 return;
205 }
206
207 if (!this.#emptyRow) {
208 this.#emptyRow = document.createElement('tr');
209 this.#emptyRow.setAttribute('data-table-empty', '');
210
211 const cell = document.createElement('td');
212 cell.colSpan = Math.max(1, this.#table.tHead?.rows[0]?.cells.length || this.#table.rows[0]?.cells.length || 1);
213 cell.textContent = this.getAttribute('empty-text') || 'No rows found.';
214 this.#emptyRow.appendChild(cell);
215 }
216
217 this.#tbody.appendChild(this.#emptyRow);
218 }
219
220 #syncStatus(visible) {
221 if (!this.#status) {

Callers 1

#applyFilterMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected