From a510f4ec41a8fa8da823d8346758c527cd41429f Mon Sep 17 00:00:00 2001 From: Shean de Montigny-Desautels Date: Tue, 28 Feb 2023 12:46:20 -0500 Subject: [PATCH] fix() use toRaw to compare initial raw object instead of proxy --- src/mixins/typeAheadPointer.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mixins/typeAheadPointer.js b/src/mixins/typeAheadPointer.js index 4409c0a91..179fec136 100644 --- a/src/mixins/typeAheadPointer.js +++ b/src/mixins/typeAheadPointer.js @@ -1,3 +1,5 @@ +import { toRaw } from 'vue' + export default { data() { return { @@ -78,8 +80,10 @@ export default { typeAheadToLastSelected() { this.typeAheadPointer = this.selectedValue.length !== 0 - ? this.filteredOptions.indexOf( - this.selectedValue[this.selectedValue.length - 1] + ? this.filteredOptions.findIndex( + (option) => + toRaw(option) === + toRaw(this.selectedValue[this.selectedValue.length - 1]) ) : -1 },