From 54cf883a3cdbda84eac6c3fb11be3234fbda7dd0 Mon Sep 17 00:00:00 2001 From: AlexSserb Date: Sat, 9 Aug 2025 18:36:53 +0400 Subject: [PATCH] fix: sortable dnd twitching fix --- src/components/dnd/SortableDnd/SortableDnd.tsx | 1 - src/components/dnd/SortableItem/SortableItem.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/dnd/SortableDnd/SortableDnd.tsx b/src/components/dnd/SortableDnd/SortableDnd.tsx index cdfd72e..e9b7319 100644 --- a/src/components/dnd/SortableDnd/SortableDnd.tsx +++ b/src/components/dnd/SortableDnd/SortableDnd.tsx @@ -120,7 +120,6 @@ const SortableDnd = ({ key={index} onClick={e => { if (!onItemClick) return; - e.preventDefault(); e.stopPropagation(); onItemClick(item); }}> diff --git a/src/components/dnd/SortableItem/SortableItem.tsx b/src/components/dnd/SortableItem/SortableItem.tsx index 430b786..0ac1def 100644 --- a/src/components/dnd/SortableItem/SortableItem.tsx +++ b/src/components/dnd/SortableItem/SortableItem.tsx @@ -27,7 +27,7 @@ const SortableItem = ({ setActivatorNodeRef, transform, transition, - } = useSortable({ id, disabled }); + } = useSortable({ id, disabled, animateLayoutChanges: () => false }); const context = useMemo( () => ({