sfxcode / formkit-primevue

PrimeVue (v4, v3) support for the FormKit validation Framwork
https://sfxcode.github.io/formkit-primevue
85 stars 10 forks source link

Failed to resolve component: MultiSelect #7

Closed jojugaad closed 9 months ago

jojugaad commented 1 year ago

Hi Tom,

I tried to make use of your great component in a FormKitSchema, but keep getting:

runtime-core.esm-bundler.js:38 [Vue warn]: Failed to resolve component: MultiSelect
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. 

I thought perhaps this could be a possible solution here: https://stackoverflow.com/questions/71601714/how-to-set-compileroptions-iscustomelement-for-vuejs-3-in-laravel-project , but that didn't work....

Any chance you could help?

csakis commented 9 months ago

Don't forget to import the PrimeVue MultiSelect component in your main.js file.

import MultiSelect from "primevue/multiselect";
...
app.component("MultiSelect", MultiSelect);

Then, you can use

<FormKit
  type="primeMultiSelect"
  name="name"
  :options="options"
  filter
  label="My Multiselect"
 />