fix(frontend): fix incorrect datatable selection count on text filter change (#4474)

Co-authored-by: Simon Meng <simon@mcpacino.tk>
pull/4610/head
cong meng 4 years ago committed by GitHub
parent f681e2d532
commit f656ad7124
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -70,7 +70,7 @@ angular.module('portainer.app').controller('GenericDatatableController', [
item.Checked = !item.Checked;
this.state.firstClickedItem = item;
}
this.state.selectedItems = this.dataset.filter((i) => i.Checked);
this.state.selectedItems = _.uniq(_.concat(this.state.selectedItems, this.state.filteredDataSet)).filter((i) => i.Checked);
if (event && this.state.selectAll && this.state.selectedItems.length !== this.state.filteredDataSet.length) {
this.state.selectAll = false;
}

Loading…
Cancel
Save