-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataTable: Multiple column sort does not work with lazy loading #6779
Comments
It works fine see my example on how to use it properly: https://github.com/melloware/quarkus-primereact/blob/main/src/main/webui/src/CrudPage.tsx Full working demo: https://github.com/melloware/quarkus-primereact |
We're unable to replicate your issue, if you are able to create a reproducer or add details please edit this issue. This issue will be closed if no activities in 20 days. |
Did you open the stackblitz example I posted? It very clearly does not work. I can post a video showing what happens if that is more helpful. |
Yes i did look at your code and I see your bug you are not doing it correctly and my posted code is. So let me see if you can figure it out.... |
@danstaplesng did you figure out your bug yet? |
thanks nerd, super helpful |
So clearly debugging or reading code is not your strength. Here is your issue: https://github.com/melloware/quarkus-primereact/blob/main/src/main/webui/src/CrudPage.tsx#L380 |
Describe the bug
Adding
sortMode='multiple'
to a datatable with thelazy
attribute causes sorting to not work. Clicking on a row header will only cause that single column to get sorted, and only with order = 1 (rather than alternating 1/-1 on each click). Additionally, holding down the metaKey and clicking a second column will again only sort that single column, rather than adding that column to the multiSortMeta array in the lazy loading query.To reproduce,
Reproducer
https://stackblitz.com/edit/srhrvv?file=src%2FApp.jsx
PrimeReact version
10.6.6
React version
18.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
Edge 126
Steps to reproduce the behavior
The stackblitz example I shared is the Lazy Load example in the Primereact docs but with
sortMode='multiple'
added, no other changes.Expected behavior
Multi sort should work the same as when not lazy loaded
The text was updated successfully, but these errors were encountered: