DataTable: sortable attribute not sorting lexicographically with string data column #4903
Labels
Resolution: By Design
The behavior in the issue is by design and the component exhibits the expected behavior
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: