primefaces / primefaces/primereact
TreeTable: onValueChange doesn't retrieve the initial data when removableSort is passed
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 8.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When the sort is reset, the onValueChange retrieves a wrong value.
Reproducer
https://stackblitz.com/edit/i3yupjwe-5ivzjcju?file=src%2FApp.jsx
System Information
primereact: 10.9.7
Steps to reproduce the behavior
- Sort the name column
The retrieved value is good ✅
- Re-sort the name column
The retrieved value is good ✅
- Re-sort the name column
The retrieved rows are not in the same order as the displayed rows.
Expected behavior
The retrieved rows should always have the same order as the displayed rows.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked StackBlitz reproducer using PrimeReact 10.9.7 and trace the TreeTable behavior involving removableSort and onValueChange. Reproduce the third sort or reset, then verify that the rows received by onValueChange remain in the same order as the displayed rows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100