diff options
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_labels_view.vue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_labels_view.vue | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_labels_view.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_labels_view.vue index 2215f2cba91..e6a25362ff0 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_labels_view.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_labels_view.vue @@ -24,7 +24,6 @@ export default { GlIntersectionObserver, LabelItem, }, - inject: ['fullPath'], model: { prop: 'localSelectedLabels', }, @@ -45,6 +44,10 @@ export default { type: Array, required: true, }, + fullPath: { + type: String, + required: true, + }, }, data() { return { @@ -84,7 +87,7 @@ export default { return this.$apollo.queries.labels.loading; }, localSelectedLabelsIds() { - return this.localSelectedLabels.map((label) => label.id); + return this.localSelectedLabels.map((label) => getIdFromGraphQLId(label.id)); }, visibleLabels() { if (this.searchKey) { @@ -130,7 +133,9 @@ export default { updateSelectedLabels(label) { let labels; if (this.isLabelSelected(label)) { - labels = this.localSelectedLabels.filter(({ id }) => id !== getIdFromGraphQLId(label.id)); + labels = this.localSelectedLabels.filter( + ({ id }) => id !== getIdFromGraphQLId(label.id) && id !== label.id, + ); } else { labels = [ ...this.localSelectedLabels, |