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

@pounard I was getting the same error. Vue-select 3.11.2 doesn't have any Vue3 compatibility updates, right now everything is on the vue-3-compat branch and there's no NPM release for those changes yet, so if you want Vue3 compatibility you'll have to tell NPM to pull in that specific branch directly from GitHub. I forget the exact syntax of the npm install I used, but this is what I have in my package.json: #1359

Closed
mhmousavi opened this issue Jan 23, 2021 · 0 comments

Comments

@mhmousavi
Copy link

@pounard I was getting the same error. Vue-select 3.11.2 doesn't have any Vue3 compatibility updates, right now everything is on the vue-3-compat branch and there's no NPM release for those changes yet, so if you want Vue3 compatibility you'll have to tell NPM to pull in that specific branch directly from GitHub. I forget the exact syntax of the npm install I used, but this is what I have in my package.json:

    "vue-select": "https://github.com/sagalbot/vue-select/tarball/feat/vue-3-compat"

So, if you run npm rm vue-select, add the line above to your dependencies in your package.json, and then run npm install, it should install this branch.
Once you reach that point, you'll may run into the error I mentioned a few replies up, I don't have the special Babel configuration for Optional Chaining, so maybe someone who has that working can help you with that. But, if you just want to get it working quick/dirty, change line 25 of /your_project_root/node_modules/vue-select/src/mixins/pointerScroll.js to:

const optionEl = this.$refs.dropdownMenu ? this.$refs.dropdownMenu.children[this.typeAheadPointer] : false

Originally posted by @Christopher-Hayes in #1251 (comment)

Hi I do this last line in my project and that error gone. but now my v-select doesn't show anything at all on project! but I can see the component in the inspect dev tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants