Fit manual order grid columns and rows to cell content

This commit is contained in:
2026-10-22 20:00:19 +09:00
parent 827cb3b0a8
commit ae50500655
3 changed files with 12 additions and 8 deletions
+3 -1
View File
@@ -104,7 +104,9 @@
data.rows.forEach((row, index) => {
const tr = body.insertRow(), number = tr.insertCell(), check = document.createElement('input');
check.type = 'checkbox'; check.dataset.rowId = row.id; check.setAttribute('aria-label', `${index + 1}행 선택`);
number.append(check, document.createTextNode(` ${index + 1}`));
const rowIndex = document.createElement('label'), rowNumber = document.createElement('span');
rowIndex.className = 'manual-row-index'; rowNumber.textContent = index + 1;
rowIndex.append(check, rowNumber); number.append(rowIndex);
row.cells.forEach((value, column) => {
const td = tr.insertCell(); td.textContent = value; td.contentEditable = 'plaintext-only'; td.tabIndex = 0;
td.dataset.id = row.id; td.dataset.column = column; td.setAttribute('aria-label', `${index + 1}행 ${headers[column] || columnLetter(column)}`);