tijiao
This commit is contained in:
@@ -8524,6 +8524,7 @@ function shouldColor(rowIndex, cellIndex, row) {
|
||||
return false;
|
||||
}
|
||||
function addRowIdToData(data) {
|
||||
console.log('data at line 8526:', data)
|
||||
let idCounter = 0; // Initialize an ID counter
|
||||
|
||||
// Iterate through each row
|
||||
@@ -8537,11 +8538,13 @@ function addRowIdToData(data) {
|
||||
const cell = data[i][j];
|
||||
|
||||
// If the cell has a rowspan attribute, propagate the same ID across all affected rows
|
||||
if (cell.rowspan && cell.rowspan > 1) {
|
||||
if (cell&&cell.text&&cell.rowspan && cell.rowspan > 1) {
|
||||
for (let k = 0; k < cell.rowspan; k++) {
|
||||
if (data[i + k]) {
|
||||
|
||||
// Ensure that all cells in the same column and across the rows have the same rowId
|
||||
data[i + k][j].rowId = `row-${idCounter - 1}`;
|
||||
data[i + k][j] ={...data[i + k][j],rowId:`row-${idCounter - 1}`} ;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user