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
When using the DataTable sort icon to sort ascending or descending two data items do not sort lexicographically. In our Data.js file we have 4 items and they should sort ascending and descending as follows:
Expected:
["123","4ARD4","7000269851","SP00500127"] when ascending
["SP00500127","7000269851","4ARD4","123"] when descending
Actual (Bug):
["4ARD4","123","7000269851","SP00500127"] when ascending
["SP00500127","7000269851","123","4ARD4"] when descending
staticlocaleComparator(locale){//performance gain using Int.Collator. It is not recommended to use localeCompare against large arrays. returnnewIntl.Collator(locale,{numeric: true}).compare;}
melloware
added
Resolution: By Design
The behavior in the issue is by design and the component exhibits the expected behavior
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 8, 2023
Describe the bug
When using the DataTable sort icon to sort ascending or descending two data items do not sort lexicographically. In our Data.js file we have 4 items and they should sort ascending and descending as follows:
Expected:
["123","4ARD4","7000269851","SP00500127"] when ascending
["SP00500127","7000269851","4ARD4","123"] when descending
Actual (Bug):
["4ARD4","123","7000269851","SP00500127"] when ascending
["SP00500127","7000269851","123","4ARD4"] when descending
Reproducer
https://codesandbox.io/s/primereact-demo-forked-72rtw4?file=/src/App.js
PrimeReact version
9.6.2
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
Chrome
Steps to reproduce the behavior
Sort on first column that says
"Code"
Expected behavior
No response
The text was updated successfully, but these errors were encountered: