diff --git a/apps/cs/src/pages/menu/lib/utils.ts b/apps/cs/src/pages/menu/lib/utils.ts index 53e79918d..333ebad94 100644 --- a/apps/cs/src/pages/menu/lib/utils.ts +++ b/apps/cs/src/pages/menu/lib/utils.ts @@ -29,9 +29,7 @@ export const generateNewTreeData = ( if (!dragSource?.data) return null; - const siblings = treeData.filter( - (node) => node.parent === dragSource?.parent, - ); + const siblings = treeData.filter((node) => node.parent === dropTargetId); const newSortSeq = siblings.findIndex((sibling) => sibling.id === dragSourceId) + 1; diff --git a/apps/cs/src/pages/menu/ui/menu-tree.tsx b/apps/cs/src/pages/menu/ui/menu-tree.tsx index b399747f4..629dd1252 100644 --- a/apps/cs/src/pages/menu/ui/menu-tree.tsx +++ b/apps/cs/src/pages/menu/ui/menu-tree.tsx @@ -60,7 +60,7 @@ function MenuTree({ treeData, siteId }: MenuTreeProps) { placeholder: "relative", }} sort={false} - dropTargetOffset={10} + dropTargetOffset={5} insertDroppableFirst={false} canDrop={(_, { dragSource, dropTargetId }) => { if (dragSource?.parent === dropTargetId) {