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

Datatable: onValueChange with Removable Sort #3133

Closed
kyybo opened this issue Aug 3, 2022 · 2 comments
Closed

Datatable: onValueChange with Removable Sort #3133

kyybo opened this issue Aug 3, 2022 · 2 comments
Labels
Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response Type: Bug Issue contains a defect related to a specific component.

Comments

@kyybo
Copy link
Contributor

kyybo commented Aug 3, 2022

Describe the bug

The onValueChange callback is triggered by sorting a column, which is fine. However, with the removableSort attribute, when you disable the sorting (third click on the column header) the onValueChange callback does not return the right values. It returns the values of the last call and not the initial values of the datatable (i.e. unsorted values).

Reproducer

Just create a Datatable with the attribute 'onValueChange={(filteredValues) => console.log(filteredValues)}' and a column with removableSort.

PrimeReact version

8.3.0

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

The onValueChange callback must return the unsorted values of the datatable when the sorting is deactivated.

@kyybo kyybo added Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: Bug Issue contains a defect related to a specific component. labels Aug 3, 2022
@melloware melloware added 👍 confirmed and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 3, 2022
@github-actions
Copy link

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response label Aug 20, 2023
@github-actions
Copy link

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you for your understanding!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

3 participants