Open rajeshmuthyala22 opened 3 months ago
It actually sorting correctly. It is sorting by string by default.
You can use custom sort function. https://primeng.org/table#api.table.props.customSort https://primeng.org/table#api.table.emitters.sortFunction
Thanks @Sinan997 for the response.
I'm new to this custom sorting. can you please provide some reference to suit my case where click of one column would sort based on multiple other columns
Describe the bug
https://stackblitz.com/edit/primeng-tablesort-demo-cyldwy?file=src%2Fapp%2Fapp.component.html
I wanted to sort nick name, but since the sorting order is incorrect, I had to implement multiple sort mode. Now the problem is when user tries to sort nick name column manually, we are back to same problem. How do we retain the multiple sort?
HTML
products.json
On load sorting
After click on nick name column manually highlighted row is incorrectly sorted
Environment
Primeng- 11.0.0 Angular- 11.0.1
Provided stackbliz link
Reproducer
No response
Angular version
11.0.1
PrimeNG version
11.0.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
8.3.0
Browser(s)
Chrome 125.0.6422.141
Steps to reproduce the behavior
After default multi sort is loaded, click on nick name column. Sorting is lost
Expected behavior
Sorting order to be correct based on multiple sort