From 111ddda46a5b99e69cb61f41efa96996c4176b7c Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 7 Aug 2024 09:20:42 -0400 Subject: [PATCH] Fixed the issue with autocomplete not working with string values set as the item's value property. --- src/wave-ui/components/w-autocomplete.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wave-ui/components/w-autocomplete.vue b/src/wave-ui/components/w-autocomplete.vue index cfed15d8e..3621f673e 100644 --- a/src/wave-ui/components/w-autocomplete.vue +++ b/src/wave-ui/components/w-autocomplete.vue @@ -301,7 +301,7 @@ export default { if (this.modelValue) { const arrayOfValues = Array.isArray(this.modelValue) ? this.modelValue : [this.modelValue] arrayOfValues.forEach(value => { - this.selection.push(this.optimizedItemsForSearch.find(item => item[this.itemValueKey] === +value)) + this.selection.push(this.optimizedItemsForSearch.find(item => item[this.itemValueKey] === value)) }) } }, @@ -316,7 +316,7 @@ export default { if (value) { const arrayOfValues = Array.isArray(value) ? value : [value] arrayOfValues.forEach(value => { - this.selection.push(this.optimizedItemsForSearch.find(item => item[this.itemValueKey] === +value)) + this.selection.push(this.optimizedItemsForSearch.find(item => item[this.itemValueKey] === value)) }) } }