I'm on vacation right now so I can't check it myself, but it should work (at least partially) as the dist file is an umd module.
I have tried it multiple things:
Vue.use(VueMultiselect), it tells me that no apply()-method is defined.Vue.component(VueMultiselect) or locally in the components: [VueMultiselect], it tells me that the component should "provide a "name" or "id" field".components: {"multiselect": VueMultiselect}, it turns into a Fragment instance and the props are all ignored.I used the lib/vue-multiselect.js file (only that one). Also, that directory does not contain a .css-file.
I have a feeling that I could be overlooking something here. If I do, please don't hurt me :)
The css code is inside the js file. It might require just a small tweak to the exporting code. I will look into it after I'm back home, so next week.
Any updates on this?
Probably today!
@LukasKnuth It鈥檚 not often I use the global scope so I had to check it myself somewhere. You can register the component like this:
Globally:
Vue.component('Multiselect', VueMultiselect.Multiselect)
or locally:
new Vue({
components: {
multiselect: VueMultiselect.Multiselect
},
...stuff here
})
It didn鈥檛 work with simply registering Vue.component(VueMultiselect) as there are more files exposed in the module, that鈥檚 why you have to explicitly request for the VueMultiselect.Multiselect component.
Works great, thanks for taking the time. Cheers!
No problem! Thanks for pointing it out. I should add this somewhere in the docs / readme.
I should add this somewhere in the docs / readme.
You really should, it took me hours to find this thread ^_^
Really nice plugin! Thanks.
CSS is still not separated in dist which makes it difficult to customize.