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
DataTable doesn't sort dates correctly. Two completely identical dates are different for table and this bug causes another bug, when you try to sort multiple columns and use date column as primary. Every next column with lower sort priority after date column will not be sorted correctly.
Added codesandbox with example. Just select Year column as primary sort and try to sort Color column as second column. You will not be able to sort cars with date "21.05.1995" by color alphabetically, because table see these three dates as different.
Excellent reproducer! This is a strange one I have to debug.
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
Sep 11, 2022
melloware
changed the title
Component: DataTable Incorrect date sort
DataTable: Multiple sorting with Date field as first sort
Sep 11, 2022
melloware
added a commit
to melloware/primereact
that referenced
this issue
Sep 11, 2022
Describe the bug
DataTable doesn't sort dates correctly. Two completely identical dates are different for table and this bug causes another bug, when you try to sort multiple columns and use date column as primary. Every next column with lower sort priority after date column will not be sorted correctly.
Added codesandbox with example. Just select Year column as primary sort and try to sort Color column as second column. You will not be able to sort cars with date "21.05.1995" by color alphabetically, because table see these three dates as different.
Reproducer
https://codesandbox.io/s/primereact-test-forked-4lf1ll?file=/src/table.js
PrimeReact version
8.5.0
React version
18.x
Language
ALL
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
DateTable understand the same dates and correctly sort another column in multisort mode
The text was updated successfully, but these errors were encountered: