Skip to content
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

Closed
danstaplesng opened this issue Jun 20, 2024 · 7 comments
Closed

DataTable: Multiple column sort does not work with lazy loading #6779

danstaplesng opened this issue Jun 20, 2024 · 7 comments
Labels
Resolution: Cannot Replicate Issue could not be replicated by Core Team

Comments

@danstaplesng
Copy link

Describe the bug

Adding sortMode='multiple' to a datatable with the lazy 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

@danstaplesng danstaplesng added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 20, 2024
@melloware
Copy link
Member

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

@melloware melloware added Resolution: Cannot Replicate Issue could not be replicated by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jun 20, 2024
Copy link

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.

@danstaplesng
Copy link
Author

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.

@melloware
Copy link
Member

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....

@melloware
Copy link
Member

@danstaplesng did you figure out your bug yet?

@danstaplesng
Copy link
Author

thanks nerd, super helpful

@melloware
Copy link
Member

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

@melloware melloware closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Cannot Replicate Issue could not be replicated by Core Team
Projects
None yet
Development

No branches or pull requests

2 participants