Skip to content

Commit

Permalink
Merge pull request #19686 from colemanw/searchKitClearSelection
Browse files Browse the repository at this point in the history
SearchKit - Fix clearing selection behavior
  • Loading branch information
eileenmcnaughton authored Feb 27, 2021
2 parents 97032c8 + 3b80106 commit e0a95fa
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ext/search/ang/crmSearchAdmin/crmSearchAdmin.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@

this.refreshAll = function() {
ctrl.stale = true;
ctrl.selectedRows.length = 0;
clearSelection();
loadResults();
};

Expand Down Expand Up @@ -577,17 +577,21 @@

function onChangeFilters() {
ctrl.stale = true;
ctrl.selectedRows.length = 0;
clearSelection();
if (ctrl.autoSearch) {
ctrl.refreshAll();
}
}

function clearSelection() {
ctrl.allRowsSelected = false;
ctrl.selectedRows.length = 0;
}

$scope.selectAllRows = function() {
// Deselect all
if (ctrl.allRowsSelected) {
ctrl.allRowsSelected = false;
ctrl.selectedRows.length = 0;
clearSelection();
return;
}
// Select all
Expand Down

0 comments on commit e0a95fa

Please sign in to comment.