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 10.8.4: Drag Selection is still broken #7321

Open
SolidAnonDev opened this issue Oct 9, 2024 · 7 comments
Open

DataTable 10.8.4: Drag Selection is still broken #7321

SolidAnonDev opened this issue Oct 9, 2024 · 7 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: Bug Issue contains a defect related to a specific component.

Comments

@SolidAnonDev
Copy link

SolidAnonDev commented Oct 9, 2024

Describe the bug

Drag Selection on DataTable has been broken for about 2 versions now. Initially my issue #7192 regarding drag selection selecting incorrect records when column filters are enable.

Issue supposedly addressed in #7200

Issue is no longer causing an error but a selection cannot be made, seems to be a combination of the weird inability to highlight/select text that came up in #7221

It's also broken on the primereact official site as well, found here:

https://primereact.org/datatable/#multiple_rows_selection

Reproducer

https://stackblitz.com/edit/vitejs-vite-5pcr8o?file=src%2FApp.tsx

System Information

System:
    OS: Linux 5.0 undefined
    CPU: (4) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    primereact: ^10.8.4 => 10.8.4 
    react: ^18.2.0 => 18.2.0

Steps to reproduce the behavior

  1. Go to reproducer link and attempt to make a drag selection
  2. You will see the behavior is not correct

Expected behavior

You are able to drag over a set of rows and make a drag selection successfully.

For what it's worth, one working version I could find is in 10.6.6 though I haven't checked beyond that,

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

@gcko ???

@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 Oct 9, 2024
@gcko
Copy link
Contributor

gcko commented Oct 9, 2024

I'll check it out

@schotime
Copy link

schotime commented Oct 11, 2024

I'm still seeing #7221 and have confirmed the issue still present in 10.8.4.

@feg3jvl
Copy link

feg3jvl commented Oct 11, 2024

For those who don't need to use onRowMouseDown in the DataTable implementation, the workaround I used to remove the draggable from the tables is this:

<PrimeDataTable onMouseDownCapture={(e) => { e.stopPropagation(); }}>
...

@gcko
Copy link
Contributor

gcko commented Oct 14, 2024

@SolidAnonDev your stackblitz has an issue with the function used for onSelectionChange -> changing e.data to e.value properly enables selection: https://stackblitz.com/edit/vitejs-vite-fqt3cm?file=src%2FApp.tsx

@SolidAnonDev
Copy link
Author

@gcko I have updated the stackblitz, but am still seeing the same behavior both in the stackblitz and on the official site here:

https://primereact.org/datatable/#multiple_rows_selection

@SolidAnonDev SolidAnonDev reopened this Oct 14, 2024
@SolidAnonDev
Copy link
Author

Sorry, didn't mean to close/reopen.

@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

5 participants