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: Drag Selection Issue with Grouped Rows #7480

Closed
MisterFISHUP opened this issue Dec 5, 2024 · 5 comments · Fixed by #7492
Closed

DataTable: Drag Selection Issue with Grouped Rows #7480

MisterFISHUP opened this issue Dec 5, 2024 · 5 comments · Fixed by #7492
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@MisterFISHUP
Copy link

Describe the bug

When using the DataTable component with grouped rows, the drag selection functionality does not work as expected. Instead of selecting the rows within the drag selection area, the selected rows are often dispersed across the table, seemingly at random.

Reproducer

https://stackblitz.com/edit/gpwf4v?file=src%2FApp.tsx

System Information

primereact: 10.8.2
react: 18.2.0

Steps to reproduce the behavior

  1. Enable row grouping in a DataTable (already done in https://stackblitz.com/edit/vitejs-vite-daiajq?file=src%2FApp.tsx)
    2 .Use the drag selection feature to select multiple rows.
  2. Observe that the rows selected do not match the drag selection area.

Expected behavior

Rows within the drag selection area should be consistently and correctly selected.

@MisterFISHUP MisterFISHUP added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 5, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 5, 2024
@sja-cslab
Copy link
Contributor

@melloware same as mine #7468? Sound kind of

@melloware
Copy link
Member

Definitely seems related.

@sja-cslab
Copy link
Contributor

#7474 seems to be some kind of related too I guess

@RolT
Copy link

RolT commented Dec 9, 2024

The reproducer works properly with 10.8.0 and has the bug in 10.8.1, maybe it's this change #6985 ?

@kl-nevermore
Copy link
Contributor

PR Submitted, please test again
#7474 seems to have processed the data multiple times, but the callback is triggered before the data is handled correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants