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: onValueChange doesn't retrieve the current sorted data #7474

Open
FAMSTM opened this issue Dec 4, 2024 · 0 comments
Open

TreeTable: onValueChange doesn't retrieve the current sorted data #7474

FAMSTM opened this issue Dec 4, 2024 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@FAMSTM
Copy link

FAMSTM commented Dec 4, 2024

Describe the bug

When sorting a column, onValueChange is triggered, but the passed data isn't the current rendered sorted data. The data from onValueChange is from the previous sort.

Reproducer

https://stackblitz.com/edit/hqxfze?file=src%2FApp.jsx

System Information

primereact: 10.8.5
Node: 18.18.2

Steps to reproduce the behavior

  1. Go to https://stackblitz.com/edit/hqxfze?file=src%2FApp.jsx
  2. Click on the title "Size" to sort the data
  3. Watch the console.log result in dev tools console

Expected behavior

Get the current sorted data with onValueChange.

The behavior of onValueChange should be the same as with DataTable, see https://stackblitz.com/edit/rx4gtk-z6quml?file=src%2FApp.jsx

@FAMSTM FAMSTM added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 4, 2024
@FAMSTM FAMSTM changed the title TreeTable: onValueChange doesn't retrieve the current sorted data when sorting TreeTable: onValueChange doesn't retrieve the current sorted data Dec 4, 2024
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

1 participant