feat(ux): select all button will unselect all if click again

This commit is contained in:
Hivert Quentin
2023-11-03 15:13:48 +01:00
parent 0df0e34073
commit 6e60b10755
3 changed files with 9 additions and 3 deletions
@@ -27,6 +27,7 @@
this.service = AddressBook;
this.selectedFolder = stateAddressbook;
this.mode = { search: false, multiple: 0 };
this.allSelected = false;
_registerHotkeys(hotkeys);
@@ -307,8 +308,9 @@
this.selectAll = function() {
_.forEach(this.selectedFolder.$cards, function(card) {
card.selected = true;
card.selected = !vm.allSelected;
});
vm.allSelected = !vm.allSelected;
this.mode.multiple = this.selectedFolder.$cards.length;
};