Hi!
I love the work done on this project. I was just wondering if anyone could shed some light on why I am getting the error:
[Vue warn]: Unknown custom element: <multiselect> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
This happens when I try to register it globally via Vue.use
I've set-up a sample app through Webpackbin, since the JSFiddle won't be able to show the full extent of how everything is interacting.
You could also reproduce it by creating a new Vue project and adding:
import { Multiselect } from 'vue-multiselect'
Vue.use(Multiselect)
There aren't any problems, though, when importing locally, in a single component.
Hi @RIanDeLaCruz, thanks for using vue-multiselect!
I don't think you're including it the right way. Please refer to the docs to see the example, you seem to be doing two things wrong:
import Moultiselect from 'vue-multiselect', not import { Moultiselect } from 'vue-multiselect'Vue.component('multiselect', Multiselect) rather than Vue.use(Multiselect)After fixing those two issues it seems like I got vue-multiselect working. Your confusion might be caused by the recent update of the docs, am I right @shentao?
Look like that is the issue. Thanks @Zip753
Most helpful comment
Hi @RIanDeLaCruz, thanks for using vue-multiselect!
I don't think you're including it the right way. Please refer to the docs to see the example, you seem to be doing two things wrong:
import Moultiselect from 'vue-multiselect', notimport { Moultiselect } from 'vue-multiselect'Vue.component('multiselect', Multiselect)rather thanVue.use(Multiselect)After fixing those two issues it seems like I got vue-multiselect working. Your confusion might be caused by the recent update of the docs, am I right @shentao?