Fit manual order grid columns and rows to cell content
This commit is contained in:
@@ -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)}`);
|
||||
|
||||
Reference in New Issue
Block a user