From bbb5a43ddf9dbbda8f5c38ac08c529d30e1a0368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D1=81=D0=BB=D0=B0=D0=B2=20?= =?UTF-8?q?=D0=9C=D0=B0=D0=BC=D0=B5=D0=BD=D0=BA=D0=BE?= Date: Tue, 24 Sep 2024 15:11:12 +0300 Subject: [PATCH] fix: #7239: Incorrect behaviour of dragging over DataTable rows --- components/lib/datatable/TableBody.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/lib/datatable/TableBody.js b/components/lib/datatable/TableBody.js index aefc7a0836..42db7fb240 100644 --- a/components/lib/datatable/TableBody.js +++ b/components/lib/datatable/TableBody.js @@ -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;