Fixed label popup at desktop view (add and remove labels)

Fixes: #4156
This commit is contained in:
Martin Filser 2021-11-17 15:31:06 +01:00
parent fc0630715c
commit 37faa41d97
2 changed files with 3 additions and 1 deletions

View file

@ -78,7 +78,7 @@ BlazeComponent.extendComponent({
return [
{
'click .js-select-label'(event) {
const card = Utils.getCurrentCard();
const card = this.data();
const labelId = this.currentData()._id;
card.toggleLabel(labelId);
event.preventDefault();

View file

@ -2016,6 +2016,7 @@ Cards.mutations({
},
addLabel(labelId) {
this.labelIds.push(labelId);
return {
$addToSet: {
labelIds: labelId,
@ -2024,6 +2025,7 @@ Cards.mutations({
},
removeLabel(labelId) {
this.labelIds = _.without(this.labelIds, labelId);
return {
$pull: {
labelIds: labelId,