Commit 83681ba7 authored by NataliaTepluhina's avatar NataliaTepluhina Committed by Florie Guibert

Fixed oldIid to nullify on closing dropdown

parent db4319b8
......@@ -87,11 +87,6 @@ export default {
required: false,
default: __('Manage group labels'),
},
isEditing: {
type: Boolean,
required: false,
default: false,
},
issuableType: {
type: String,
required: true,
......@@ -111,6 +106,7 @@ export default {
issuableLabels: [],
labelsSelectInProgress: false,
oldIid: null,
isEditing: false,
};
},
computed: {
......@@ -133,8 +129,7 @@ export default {
};
},
update(data) {
this.selected = data.workspace?.issuable?.labels.nodes || [];
return this.selected;
return data.workspace?.issuable?.labels.nodes || [];
},
error() {
createFlash({ message: __('Error fetching labels.') });
......@@ -143,7 +138,11 @@ export default {
},
watch: {
iid(_, oldVal) {
if (this.isEditing) {
this.oldIid = oldVal;
} else {
this.oldIid = null;
}
},
},
methods: {
......@@ -260,6 +259,8 @@ export default {
:title="__('Labels')"
:loading="isLoading"
:can-edit="allowLabelEdit"
@open="isEditing = true"
@close="isEditing = false"
>
<template #collapsed>
<dropdown-value
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment