Merge pull request #4170 from mfilser/fix_label_popup_desktop_view_add_remove

Fixed label popup at desktop view (add and remove labels)
This commit is contained in:
Lauri Ojansivu 2021-11-25 15:42:51 +02:00 committed by GitHub
commit 0ceff124cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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,