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 { ...@@ -87,11 +87,6 @@ export default {
required: false, required: false,
default: __('Manage group labels'), default: __('Manage group labels'),
}, },
isEditing: {
type: Boolean,
required: false,
default: false,
},
issuableType: { issuableType: {
type: String, type: String,
required: true, required: true,
...@@ -111,6 +106,7 @@ export default { ...@@ -111,6 +106,7 @@ export default {
issuableLabels: [], issuableLabels: [],
labelsSelectInProgress: false, labelsSelectInProgress: false,
oldIid: null, oldIid: null,
isEditing: false,
}; };
}, },
computed: { computed: {
...@@ -133,8 +129,7 @@ export default { ...@@ -133,8 +129,7 @@ export default {
}; };
}, },
update(data) { update(data) {
this.selected = data.workspace?.issuable?.labels.nodes || []; return data.workspace?.issuable?.labels.nodes || [];
return this.selected;
}, },
error() { error() {
createFlash({ message: __('Error fetching labels.') }); createFlash({ message: __('Error fetching labels.') });
...@@ -143,7 +138,11 @@ export default { ...@@ -143,7 +138,11 @@ export default {
}, },
watch: { watch: {
iid(_, oldVal) { iid(_, oldVal) {
this.oldIid = oldVal; if (this.isEditing) {
this.oldIid = oldVal;
} else {
this.oldIid = null;
}
}, },
}, },
methods: { methods: {
...@@ -260,6 +259,8 @@ export default { ...@@ -260,6 +259,8 @@ export default {
:title="__('Labels')" :title="__('Labels')"
:loading="isLoading" :loading="isLoading"
:can-edit="allowLabelEdit" :can-edit="allowLabelEdit"
@open="isEditing = true"
@close="isEditing = false"
> >
<template #collapsed> <template #collapsed>
<dropdown-value <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