I'm using PrimeVue fatatable for my website, but even though I've installed all requirements nothing shows up for me. there's only a warning coming up:
Failed to resolve component: data-table
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
in main.js
import PrimeVue from 'primevue/config'
import Column from 'primevue/column'
import Dialog from 'primevue/dialog'
import DataTable from 'primevue/datatable'
appInstance.use(PrimeVue)
appInstance.component('Column', Column)
appInstance.component('Dialog', Dialog)
appInstance.component('Datatable', DataTable)
in userTable.vue:
<data-table :value="products">
<Column field="brand" header="Brand"></Column>
<Column field="year" header="Year"></Column>
<Column field="color" header="Color"></Column>
<Column field="vin" header="Vin"></Column>
</data-table>
and an example of products in data():
products: [
{"brand": "Volkswagen", "year": 2012, "color": "Orange", "vin": "dsad231ff"},
{"brand": "Audi", "year": 2011, "color": "Black", "vin": "gwregre345"},
{"brand": "Renault", "year": 2005, "color": "Gray", "vin": "h354htr"},
{"brand": "BMW", "year": 2003, "color": "Blue", "vin": "j6w54qgh"},
{"brand": "Mercedes", "year": 1995, "color": "Orange", "vin": "hrtwy34"},
{"brand": "Volvo", "year": 2005, "color": "Black", "vin": "jejtyj"},
{"brand": "Honda", "year": 2012, "color": "Yellow", "vin": "g43gr"},
{"brand": "Jaguar", "year": 2013, "color": "Orange", "vin": "greg34"},
{"brand": "Ford", "year": 2000, "color": "Black", "vin": "h54hw5"},
{"brand": "Fiat", "year": 2013, "color": "Red", "vin": "245t2s"}
],
It's vue 3 I'm working on, so if anyone knows the reason and solution by anychance, I'll be so glad :')
<datatable></datatable>instead (without the-) ? Because in your main.js you register it asDatatablenotDataTable