mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-01-05 20:05:51 +01:00
Merge pull request #4649 from votex001/multi-select-item-fix
[fix] prevent duplicates in multi-selects
This commit is contained in:
commit
088353ae26
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user