Handle the case where there are hidden items in the column.

pull/18385/head
maliming 2 years ago
parent 807487dcd4
commit 3dca6ea5a7

@ -236,8 +236,6 @@ var abp = abp || {};
return;
}
var cells = $(nRow).children("td");
for (var colIndex = 0; colIndex < columns.length; colIndex++) {
var column = columns[colIndex];
if (column.rowAction) {
@ -245,9 +243,16 @@ var abp = abp || {};
hideEmptyColumn($actionContainer, tableInstance, colIndex);
if ($actionContainer) {
var $actionButton = $(cells[colIndex]).find(".abp-action-button");
var cells = $(nRow).children("td");
for (var i = 0; i < cells.length; i++) {
var cell = cells[i];
if (cell._DT_CellIndex && cell._DT_CellIndex.row === iDisplayIndex && cell._DT_CellIndex.column === colIndex) {
var $actionButton = $(cell).find(".abp-action-button");
if ($actionButton.length === 0) {
$(cells[colIndex]).empty().append($actionContainer);
$(cell).empty().append($actionContainer);
};
break;
}
}
}
}

Loading…
Cancel
Save