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 2020-12-14 12:25:00 +13:00 committed by GitHub
parent f681e2d532
commit f656ad7124
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ angular.module('portainer.app').controller('GenericDatatableController', [
item.Checked = !item.Checked; item.Checked = !item.Checked;
this.state.firstClickedItem = item; 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) { if (event && this.state.selectAll && this.state.selectedItems.length !== this.state.filteredDataSet.length) {
this.state.selectAll = false; this.state.selectAll = false;
} }