shentao / vue-multiselect

Universal select/multiselect/tagging component for Vue.js
https://vue-multiselect.js.org/
MIT License
6.65k stars 990 forks source link

How to use it with vue electron project #1697

Open aminvandh opened 1 year ago

aminvandh commented 1 year ago

import Multiselect from 'vue-multiselect';

options array: {"value": "BoardGame", "label": "BoardGame"}, {"value": "Building", "label": "Building"}, ..

error i got: caught TypeError: Cannot read properties of undefined (reading '_c') at Proxy.r (vue-multiselect.min.js:1:1) at renderComponentRoot (runtime-core.esm-bundler.js:914:1) at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js:5649:1) at ReactiveEffect.run (reactivity.esm-bundler.js:190:1) at instance.update (runtime-core.esm-bundler.js:5763:1) at setupRenderEffect (runtime-core.esm-bundler.js:5777:1) at mountComponent (runtime-core.esm-bundler.js:5559:1) at processComponent (runtime-core.esm-bundler.js:5517:1) at patch (runtime-core.esm-bundler.js:5119:1) at mountChildren (runtime-core.esm-bundler.js:5303:1)

mattelen commented 1 year ago

@aminvandh can you please provide a reproducible piece of code, like a git or a jsfiddle like https://jsfiddle.net/mattelen/8cyt3hrn/5/

aminvandh commented 1 year ago

@aminvandh can you please provide a reproducible piece of code, like a git or a jsfiddle like https://jsfiddle.net/mattelen/8cyt3hrn/5/

Thanks for help, https://github.com/aminvandh/desktopentry i want to choose among options and add them into category

mattelen commented 1 year ago

Right now I get a 404 on that repo, however earlier when I had a look, it looks like you had a non vue 3 compatible version of the multiselect installed as a dev dependency, and then the vue 3 compatible version as a required dependency. So your app might be using the Vue 2 version. I recommend checking that out and seeing if that fixes your issue.