Commit 896cbb63 authored by 杨奕's avatar 杨奕 Committed by GitHub

Table: update selection isAllSelected (#9634)

parent b68f18aa
......@@ -502,23 +502,14 @@ TableStore.prototype.updateAllSelected = function() {
let selectedCount = 0;
for (let i = 0, j = data.length; i < j; i++) {
const item = data[i];
if (selectable) {
const isRowSelectable = selectable.call(null, item, i);
if (isRowSelectable) {
if (!isSelected(item)) {
isAllSelected = false;
break;
} else {
selectedCount++;
}
}
} else {
if (!isSelected(item)) {
const isRowSelectable = selectable && selectable.call(null, item, i);
if (!isSelected(item)) {
if (!selectable || isRowSelectable) {
isAllSelected = false;
break;
} else {
selectedCount++;
}
} else {
selectedCount++;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment