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 is enabled automatically when enabling rows reorder #7716

Open
BAISTM opened this issue Feb 18, 2025 · 6 comments
Labels
Type: Bug Issue contains a defect related to a specific component.

Comments

@BAISTM
Copy link

BAISTM commented Feb 18, 2025

Describe the bug

Enabling rows reorder makes the drag selection active and there is not way to disable it.

Reproducer

https://stackblitz.com/edit/gu8bylvi?file=src%2FApp.jsx

System Information

primereact: 10.9.1

Steps to reproduce the behavior

No response

Expected behavior

No response

@BAISTM BAISTM added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 18, 2025
@melloware
Copy link
Member

This may be a dumb question but don't you need to be able to drag the rows to re-order them?

@sja-cslab
Copy link
Contributor

sja-cslab commented Feb 18, 2025

@melloware You're correct but the issue here is something else.
The datatable has singleSelection set but as soon as you enable reorder, the table uses drag-multiselect so it enables the dragSelection property.

@BAISTM
Copy link
Author

BAISTM commented Feb 18, 2025

Right @sja-cslab, multiple rows can be selected by dragging a row even if the selection mode is Single (cf: screenshot).

Image

@sja-cslab
Copy link
Contributor

Could you try that with primereact 10.9.2? We had some changes in the Datatable-Component around multi selection

@BAISTM
Copy link
Author

BAISTM commented Feb 18, 2025

The reproducer uses the version 10.9.2 of primereact

Image

@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 Feb 18, 2025
@melloware
Copy link
Member

OK marked as bug!

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

No branches or pull requests

3 participants