Skip to content

Commit

Permalink
fix: primefaces#7239: Incorrect behaviour of dragging over DataTable …
Browse files Browse the repository at this point in the history
…rows
  • Loading branch information
Владислав Маменко authored and Владислав Маменко committed Sep 24, 2024
1 parent 7265aeb commit f1c95af
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/lib/datatable/TableBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,11 @@ export const TableBody = React.memo(
const onRowDragOver = (e) => {
const { originalEvent: event, index } = e;

if (rowDragging.current && draggedRowIndex.current !== index) {
if (!rowDragging.current) {
return;
}

if (draggedRowIndex.current !== index) {
const rowElement = event.currentTarget;
const rowY = DomHandler.getOffset(rowElement).top + DomHandler.getWindowScrollTop();
const pageY = event.pageY + window.scrollY;
Expand Down

0 comments on commit f1c95af

Please sign in to comment.