mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Deselect a tag if it is selected when removing (#9614)
This commit is contained in:
@@ -407,6 +407,9 @@ export default {
|
|||||||
this.newTag = null;
|
this.newTag = null;
|
||||||
},
|
},
|
||||||
removeTag (index, key) {
|
removeTag (index, key) {
|
||||||
|
const tagId = this.tagsSnap[key][index].id;
|
||||||
|
const indexInSelected = this.selectedTags.indexOf(tagId);
|
||||||
|
if (indexInSelected !== -1) this.$delete(this.selectedTags, indexInSelected);
|
||||||
this.$delete(this.tagsSnap[key], index);
|
this.$delete(this.tagsSnap[key], index);
|
||||||
},
|
},
|
||||||
saveTags () {
|
saveTags () {
|
||||||
|
|||||||
Reference in New Issue
Block a user