TanStack / table

🤖 Headless UI for building powerful tables & datagrids for TS/JS - React-Table, Vue-Table, Solid-Table, Svelte-Table
https://tanstack.com/table
MIT License
24.61k stars 3.04k forks source link

Row count parameter is not reactive when using manual pagination (serverside) #5412

Closed dogukanoksuz closed 4 months ago

dogukanoksuz commented 4 months ago

TanStack Table version

v8.13.2

Framework/Library version

vue@latest

Describe the bug and the steps to reproduce it

When using server-side pagination mode, rowCount might get changed by filtering etc. but table's rowCount parameter only can be changed at when initializing with params.

Because of rowCount parameter cannot be changed, when i'm sending filters, pagination total page count stays same.

image

I think moving this parameter to dynamic changable state(like pagination/sorting etc...) will fix this issue.

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

-

Screenshots or Videos (Optional)

Do you intend to try to help solve this bug with your own PR?

No, because I do not know how

Terms & Code of Conduct

dogukanoksuz commented 4 months ago

Oh sorry for inconvenience,

I fixed it changing code by;

from:

    rowCount: serverPaginationData.value.total_records,

to:

get rowCount() {
      return serverPaginationData.value.total_records;
    },