Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix() use toRaw to compare initial raw object instead of proxy #1761

Open
wants to merge 1 commit into
base: beta
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix() use toRaw to compare initial raw object instead of proxy
  • Loading branch information
s-montigny-desautels committed Feb 28, 2023
commit a510f4ec41a8fa8da823d8346758c527cd41429f
8 changes: 6 additions & 2 deletions src/mixins/typeAheadPointer.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { toRaw } from 'vue'

export default {
data() {
return {
Expand Down Expand Up @@ -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
},
Expand Down