primefaces / primevue

Next Generation Vue UI Component Library
https://primevue.org
MIT License
10.3k stars 1.22k forks source link

DataTable: paginator link only shows `1` #5542

Open scripty-script opened 6 months ago

scripty-script commented 6 months ago

Describe the bug

The paginator link only shows 1 and the rest of the buttons are disabled, despite I set the :totalRecords="55" and :rows="15"

image

Reproducer

https://stackblitz.com/edit/primevue-create-vue-issue-template-qt69m8?file=src%2FApp.vue

PrimeVue version

^3.50.0

Vue version

3.x

Language

ES6

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

henry-verto commented 4 months ago

I am facing the same issue. It looks like the v model value length will override the totalRecords value.

henry-verto commented 4 months ago

I am facing the same issue. It looks like the v model value length will override the totalRecords value.

Upon checking their code, it can be fixed by enabling the lazy prop.

totalRecordsLength() {
    if (this.lazy) {
        return this.totalRecords;
    } else {
        const data = this.processedData;

        return data ? data.length : 0;
    }
},
filipbekic01 commented 2 months ago

This is frustrating. Can't believe that very basic feature of DataTable does not work.