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

TreeTable: sorting does not work with lazy-loaded data #5703

Open
ray007 opened this issue May 8, 2024 · 2 comments
Open

TreeTable: sorting does not work with lazy-loaded data #5703

ray007 opened this issue May 8, 2024 · 2 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@ray007
Copy link

ray007 commented May 8, 2024

Describe the bug

TreeTable with lazy loaded data.
Clicking on the column headers changes the sort icon, but not the order of displayed rows.

Example was made by only adding sortable to the column definition of the lazy load from documentation.

Reproducer

https://stackblitz.com/edit/7mwdun?file=src%2FApp.vue

PrimeVue version

3.51.0

Vue version

3.x

Language

ES6

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Load example
  2. Click on column header - row order does not change

Expected behavior

Row order does change depending on data.

@ray007 ray007 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 8, 2024
@memin20
Copy link

memin20 commented May 14, 2024

Seems to be same for the DataTable component, Is there a workaround for this problem? Which version was the last known working version?

@alqa-dash
Copy link

alqa-dash commented May 17, 2024

3.52.0 - sort with lazy load does not work.

I've tried to use @sort="onSort($event)". Sort works but when one clicks sort on column on page other then first, paginator set current page to 1.

UPDATE: looks like in my case current page is set to 0 because of emit 'update:first' with 0 as payload in onColumnHeaderClick function.

Why is it necessary to reset page on sorting page dataset?

UPDATE2: even if manually emit('update:first') with real page on behalf of datatable or any other component, current page will not setting back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

3 participants