diff --git a/src/components/input/multiselect.vue b/src/components/input/multiselect.vue index c25de19fbc..a6857c0540 100644 --- a/src/components/input/multiselect.vue +++ b/src/components/input/multiselect.vue @@ -222,7 +222,7 @@ export default { }) }, filteredSearchResults() { - if (this.multiple && this.internalValue !== null) { + if (this.multiple && this.internalValue !== null && Array.isArray(this.internalValue)) { return this.searchResults.filter(item => !this.internalValue.some(e => e === item)) } @@ -282,6 +282,9 @@ export default { this.closeSearchResults() }, setSelectedObject(object, resetOnly = false) { + if (!Array.isArray(object)) { + object = [object] + } this.$set(this, 'internalValue', object) // We assume we're getting an array when multiple is enabled and can therefore leave the query