-
Notifications
You must be signed in to change notification settings - Fork 1.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 10.8.4: Drag Selection is still broken #7321
Comments
@gcko ??? |
I'll check it out |
I'm still seeing #7221 and have confirmed the issue still present in 10.8.4. |
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:
|
@SolidAnonDev your stackblitz has an issue with the function used for |
@gcko I have updated the stackblitz, but am still seeing the same behavior both in the stackblitz and on the official site here: |
Sorry, didn't mean to close/reopen. |
I believe the issue is in the file /datatable/TableBody.js at line 600 The Method const onRowMouseDown = (e) => {
I don't understand why event.target.draggable is set to !isDraggableHandle, However, when I remove the negation (!), the selection functionality works again. Additionally, I tested other functions of the datatable, and everything is working correctly. The last change to this file was in Fix #6998 @KumJungMin can you please let me know if this makes sense, and I can proceed with a pull request. |
I refactored the existing code into a concise single line. |
That is great, thanks for clarifying that. I will submit a pull request just for that ! operator. |
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
Steps to reproduce the behavior
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,The text was updated successfully, but these errors were encountered: