Skip to content

Commit

Permalink
toggle select all on/off if user uses ctrl-a
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhamidawan committed Mar 4, 2024
1 parent 6637526 commit af09219
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion client/src/components/History/Content/SelectedItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ export default {
setShowSelection(val) {
this.showSelection = val;
},
selectAllInCurrentQuery(loadedItems = []) {
selectAllInCurrentQuery(loadedItems = [], force = true) {
// if we are not forcing selectAll, and all items are already selected; deselect them
if (!force && this.allSelected) {
this.setShowSelection(false);
return;
}
this.selectItems(loadedItems);
this.allSelected = true;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ function setItemDragstart(
"
@hide-selection="setShowSelection(false)"
@shift-select="(eventKey) => shiftSelect(nextSelections(item, eventKey))"
@select-all="selectAllInCurrentQuery(historyItems)"
@select-all="selectAllInCurrentQuery(historyItems, false)"
@tag-click="updateFilterValue('tag', $event)"
@tag-change="onTagChange"
@toggleHighlights="updateFilterValue('related', item.hid)"
Expand Down

0 comments on commit af09219

Please sign in to comment.