Skip to content

Commit

Permalink
fix: #7239: Incorrect behaviour of dragging over DataTable rows (#7241)
Browse files Browse the repository at this point in the history
Co-authored-by: Владислав Маменко <[email protected]>
  • Loading branch information
kttmv and Владислав Маменко authored Sep 24, 2024
1 parent 7265aeb commit 92cba95
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 92cba95

Please sign in to comment.