[fix] prevent duplicates in multi-selects

This commit is contained in:
votex001 2025-09-03 18:19:52 +03:00
parent 6ea70608a1
commit fbe9971a8b
2 changed files with 2 additions and 2 deletions

View File

@ -278,7 +278,7 @@ export default {
})
},
insertNewItem(item) {
this.selected.push(item)
if (!this.selected.includes(item)) this.selected.push(item)
this.$emit('input', this.selected)
this.$emit('newItem', item)
this.textInput = null

View File

@ -287,7 +287,7 @@ export default {
})
},
insertNewItem(item) {
this.selected.push(item)
if (!this.selected.find((i) => i.name === item.name)) this.selected.push(item)
this.$emit('input', this.selected)
this.$emit('newItem', item)
this.textInput = null