quasarframework / quasar

Quasar Framework - Build high-performance VueJS user interfaces in record time

Home Page:https://quasar.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QTable - request (server side pagination) not trigger

elselapatha opened this issue · comments

What happened?

In QTable with @request (server side pagination) with v-model:pagination when change pagination object manually with external (outside QPagination) pagination not trigger @request function

What did you expect to happen?

should trigger @request event when change pagination in

Reproduction URL

https://jsfiddle.net/2m8zntd6/

How to reproduce?

  1. click on pagination link

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Components (quasar)

Platforms/Browsers

No response

Quasar info output

No response

Relevant log output

No response

Additional context

No response

Hi,

You are changing the pagination from "outside" of the QTable. While using the server-side pagination, the component does not (and should NOT) watch for the "pagination" changes from outside the component. This would only generate an infinite loop in the onRequest handler (because it changes the pagination Object).

When using the server-side pagination you are in charge of calling QTable's requestServerInteraction() when you need it.

So:

<q-pagination
        v-model="pagination.page"
        @update:model-value="onPag"

function onPag () {
  tableRef.value.requestServerInteraction()
}