mirror of
https://github.com/wekan/wekan.git
synced 2025-12-20 09:20:12 +01:00
Merge pull request #305 from AlexanderS/fix/multiselect-toggle
Fix multiselect toggle logic
This bug was introduced in 45b662a
This commit is contained in:
commit
ec92f84f41
1 changed files with 4 additions and 4 deletions
|
|
@ -69,9 +69,9 @@ BlazeComponent.extendComponent({
|
||||||
const mappedSelection = this.mapSelection('label', labelId);
|
const mappedSelection = this.mapSelection('label', labelId);
|
||||||
|
|
||||||
if (_.every(mappedSelection)) {
|
if (_.every(mappedSelection)) {
|
||||||
mutateSelectedCards('addLabel', labelId);
|
|
||||||
} else if (_.every(mappedSelection, (bool) => !bool)) {
|
|
||||||
mutateSelectedCards('removeLabel', labelId);
|
mutateSelectedCards('removeLabel', labelId);
|
||||||
|
} else if (_.every(mappedSelection, (bool) => !bool)) {
|
||||||
|
mutateSelectedCards('addLabel', labelId);
|
||||||
} else {
|
} else {
|
||||||
const popup = Popup.open('disambiguateMultiLabel');
|
const popup = Popup.open('disambiguateMultiLabel');
|
||||||
// XXX We need to have a better integration between the popup and the
|
// XXX We need to have a better integration between the popup and the
|
||||||
|
|
@ -83,9 +83,9 @@ BlazeComponent.extendComponent({
|
||||||
const memberId = this.currentData()._id;
|
const memberId = this.currentData()._id;
|
||||||
const mappedSelection = this.mapSelection('member', memberId);
|
const mappedSelection = this.mapSelection('member', memberId);
|
||||||
if (_.every(mappedSelection)) {
|
if (_.every(mappedSelection)) {
|
||||||
mutateSelectedCards('assignMember', memberId);
|
|
||||||
} else if (_.every(mappedSelection, (bool) => !bool)) {
|
|
||||||
mutateSelectedCards('unassignMember', memberId);
|
mutateSelectedCards('unassignMember', memberId);
|
||||||
|
} else if (_.every(mappedSelection, (bool) => !bool)) {
|
||||||
|
mutateSelectedCards('assignMember', memberId);
|
||||||
} else {
|
} else {
|
||||||
const popup = Popup.open('disambiguateMultiMember');
|
const popup = Popup.open('disambiguateMultiMember');
|
||||||
// XXX We need to have a better integration between the popup and the
|
// XXX We need to have a better integration between the popup and the
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue