Skip to content

Commit

Permalink
fix: #6942 Fix Datatable Reorderable Rows in Unstyled mode
Browse files Browse the repository at this point in the history
- Add conditional to catch `onRowMouseDown` when using unstyled mode.
  • Loading branch information
gcko committed Jul 29, 2024
1 parent 7c64010 commit 25eea14
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/lib/datatable/TableBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 25eea14

Please sign in to comment.