You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we combine multiselect with sorting, selection no longer works as expected. The array we receive in onSelectionChange contains the elements that would be at those indices if sorting were not applied.
(optional) selection is working as expected via metakey and via dragselection
(optional) unselect all
sort column
try to multiselect the first few items
The result will be the selected items (the number is correct), but the selected items will be those that would have been selected if no sorting had been applied.
Expected behavior
Receiving the correct items in onSelectionChange
The text was updated successfully, but these errors were encountered:
sja-cslab
changed the title
Datatable: Sort with multiselect - wrong/no selection
Datatable: Sort with multiselect - wrong selection
Dec 2, 2024
melloware
added
Type: Bug
Issue contains a defect related to a specific component.
and removed
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
labels
Dec 2, 2024
Describe the bug
If we combine multiselect with sorting, selection no longer works as expected. The array we receive in
onSelectionChange
contains the elements that would be at those indices if sorting were not applied.This
Reproducer
https://stackblitz.com/edit/vitejs-vite-lvxdbt?file=src%2FApp.tsx
System Information
PrimeReact 10.8.5 happens in 10.8.4 too.
Steps to reproduce the behavior
The result will be the selected items (the number is correct), but the selected items will be those that would have been selected if no sorting had been applied.
Expected behavior
Receiving the correct items in
onSelectionChange
The text was updated successfully, but these errors were encountered: