We are having a specific problem in the TableBody implementation that implies that all the rows in the table are draggable, and that the draggable attribute is not being read and resolving the situation. In my implementation, the attribute dragSelection is false.
We tried to passtrought in all the layers (table, tablebody, columns, etc) the attribute draggable as false, but without success.
In the DataTable documentation itself, all the tables without exception have the same behaviour (I wasn't able to attach a file here). The scenario is simply try to copy the content of a cell in the DataTable. (https://primereact.org/datatable/)
But this is not the ideal way to fix it. If you guys have a better alternative, I would be glad to see.
But I think this should be resolved, because the draggable attribute is missleading in this case. The main attribute to use that drag and drop should be at the table level the dragSelection and via props the draggable.
We are having a specific problem in the TableBody implementation that implies that all the rows in the table are draggable, and that the
draggable
attribute is not being read and resolving the situation. In my implementation, the attributedragSelection
is false. We tried to passtrought in all the layers (table, tablebody, columns, etc) the attributedraggable
as false, but without success.In the DataTable documentation itself, all the tables without exception have the same behaviour (I wasn't able to attach a file here). The scenario is simply try to copy the content of a cell in the DataTable. (https://primereact.org/datatable/)
In my investigation of the issues, looks like that the commit above is causing the issue. The isDraggableHandle within onRowMouseDown is what appears to be the root cause of the problem, as it only considers the
p-datatable-reorderablerow-handle
class. https://github.com/primefaces/primereact/blame/fb0305717f1ff05bf9a521b70208087fdd8d7995/components/lib/datatable/TableBody.js#L595As a workaround that I found to resolve the issue, in case you don't need the onRowMouseDown event, is to capture the event and stop the propagation:
But this is not the ideal way to fix it. If you guys have a better alternative, I would be glad to see. But I think this should be resolved, because the draggable attribute is missleading in this case. The main attribute to use that drag and drop should be at the table level the
dragSelection
and via props thedraggable
.