DataTable Basic: Wrapper becomes button

UI Components for Vue
Post Reply
jochem
Posts: 5
Joined: 04 Mar 2023, 11:22

04 Mar 2023, 11:25

Bug is not related to only the DataTable Basic component, but basically every DataTable component.

I'm using the exact same code as in the DataTable example: https://primevue.org/datatable/basic.

In the DOM, the DataTable element results in:

Code: Select all

<div data-v-5ccf6f9a="">
 <button class="p-button p-component" type="button" responsivelayout="scroll" value="[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]">
 <!----><!----><!----><!---->
</button>
</div>
Is there something wrong with the [object Object]? There's no documentation about that.

If I log the `getProductsSmall()` output in `ProductService.js` I get an array with 10 items.

Dependencies:

Code: Select all

"dependencies": {
    "pinia": "^2.0.28",
    "primeicons": "^6.0.1",
    "primevue": "^3.23.0",
    "vue": "^3.2.45",
    "vue-router": "^4.1.6",
    "vuedraggable": "^4.1.0"
  },
  "devDependencies": {
    "@rushstack/eslint-patch": "^1.1.4",
    "@types/node": "^18.11.12",
    "@vitejs/plugin-vue": "^4.0.0",
    "@vue/eslint-config-prettier": "^7.0.0",
    "@vue/eslint-config-typescript": "^11.0.0",
    "@vue/tsconfig": "^0.1.3",
    "eslint": "^8.22.0",
    "eslint-plugin-vue": "^9.3.0",
    "npm-run-all": "^4.1.5",
    "prettier": "^2.7.1",
    "sass": "^1.58.3",
    "sass-loader": "^13.2.0",
    "typescript": "~4.7.4",
    "vite": "^4.0.0",
    "vue-tsc": "^1.0.12"
  }

jochem
Posts: 5
Joined: 04 Mar 2023, 11:22

08 Mar 2023, 15:48

I also get this error in the CLI. App still works.

[vite] error while updating dependencies:
Error: Build failed with 1 error:
error: Two output files share the same path but have different contents: node_modules/.vite/deps_temp/primevue_Column.js

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

13 Mar 2023, 09:32

Can you post the part where you import and register the DataTable.

jochem
Posts: 5
Joined: 04 Mar 2023, 11:22

13 Mar 2023, 11:01

main.ts

Code: Select all

import { createApp } from "vue";

// Vue
import App from "./App.vue";
import router from "./router";

// PrimeVue
import PrimeVue from "primevue/config";
import Column from "primevue/column";
import DataTable from "primevue/button";

const app = createApp(App);

app.use(PrimeVue);

// Components (PV prefix)
app.component("PVColumn", Column);
app.component("PVDataTable", DataTable);

app.mount("#app");

jochem
Posts: 5
Joined: 04 Mar 2023, 11:22

21 Mar 2023, 22:11

Any update on this?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

22 Mar 2023, 09:04

Code: Select all

import DataTable from "primevue/button";
should be;

Code: Select all

import DataTable from "primevue/datatable";

jochem
Posts: 5
Joined: 04 Mar 2023, 11:22

27 Mar 2023, 18:48

me stupid.

Thanks tho, solved! :)

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests