From 25eea14881016b1588c2a484dec24ab0100484b0 Mon Sep 17 00:00:00 2001 From: Jared Scott Date: Mon, 29 Jul 2024 13:59:21 +0800 Subject: [PATCH] fix: #6942 Fix Datatable Reorderable Rows in Unstyled mode - Add conditional to catch `onRowMouseDown` when using unstyled mode. --- components/lib/datatable/TableBody.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/lib/datatable/TableBody.js b/components/lib/datatable/TableBody.js index b07975754e..3055ad0956 100644 --- a/components/lib/datatable/TableBody.js +++ b/components/lib/datatable/TableBody.js @@ -609,6 +609,9 @@ export const TableBody = React.memo( if (!isUnstyled() && DomHandler.hasClass(event.target, 'p-datatable-reorderablerow-handle')) { event.currentTarget.draggable = true; event.target.draggable = false; + } else if (isUnstyled() && DomHandler.getAttribute(event.target, 'data-pc-section') === 'rowreordericon') { + event.currentTarget.draggable = true; + event.target.draggable = false; } else { event.currentTarget.draggable = false; }