Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataTable: the table is broken in 3.18.0 #3189

Closed
erropix opened this issue Oct 29, 2022 · 3 comments · Fixed by #3196
Closed

DataTable: the table is broken in 3.18.0 #3189

erropix opened this issue Oct 29, 2022 · 3 comments · Fixed by #3196
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@erropix
Copy link

erropix commented Oct 29, 2022

Describe the bug

Once I updated primevue to 3.18, all the tables in my application are broken and after disabled props one by one, I found that if alwaysShowPaginator is set to false the table breaks, and I get this error in the console:

Uncaught (in promise) TypeError: this.$refs.paginator is not iterable
    at Proxy.setPaginatorAttribute (primevue_datatable.js?v=670db3b1:1624:22)
    at Proxy.mounted (primevue_datatable.js?v=670db3b1:1523:10)
    ...

Reproducer

https://codesandbox.io/s/primevue-3-18-0-table-paginator-bug-n3f3v3?file=/src/App.vue

PrimeVue version

3.18.0

Vue version

3.x

Language

ES6

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@erropix erropix added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Oct 29, 2022
@pkwestm
Copy link

pkwestm commented Oct 30, 2022

I think this error is related to the component primevue/paginator. I got the same error using only Paginator component. Error is shown when count < limit. I solved this adding a v-if to not render paginator in those cases. My working code is as follows

    <Paginator
      v-if="numCount > numLimit"
      class="mt-4"
      :first="(curPageNum - 1) * numLimit"
      :rows="numLimit"
      :always-show="false"
      :total-records="numCount"
      @page="onPage($event)"
    ></Paginator>

@erropix
Copy link
Author

erropix commented Oct 30, 2022

@pkwestm that works in your case, but for the DataTable component, we can't do the same.

@smit6488
Copy link

Hi, @ALL I am getting the error related to data table

Here is the screenshot
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants