primefaces / primefaces/primereact

TreeTable: onValueChange doesn't retrieve the initial data when removableSort is passed

Open
#8,485 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Needs Triage
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
  1. Sort the name column

The retrieved value is good ✅

Image
  1. Re-sort the name column

The retrieved value is good ✅

Image
  1. Re-sort the name column

The retrieved rows are not in the same order as the displayed rows.

Image
Expected behavior

The retrieved rows should always have the same order as the displayed rows.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.