fix: dropping favorites to the last position in a open folder (#22360)

Fixes #9213 

Before:


https://github.com/user-attachments/assets/0855f9c1-07c7-4080-8b5f-94fbe3c8b505



After:


https://github.com/user-attachments/assets/6ae26e89-9fe5-4ebe-b512-d8287ed2c070



<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/22360?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->

Signed-off-by: Parship Chowdhury <parshipchowdhury@gmail.com>
This commit is contained in:
Parship Chowdhury
2026-07-08 17:58:15 +05:30
committed by GitHub
parent 4b9f393167
commit 6554440bb1
@@ -378,12 +378,13 @@ export const NavigationMenuItemFolderDnd = ({
droppableId={folderContentDroppableId}
index={navigationMenuItems.length}
disabled={dropDisabled}
collisionPriority={FOLDER_HEADER_SLOT_COLLISION_PRIORITY}
>
<NavigationItemDropTarget
folderId={folderId}
index={navigationMenuItems.length}
sectionId={sectionId}
compact={isCompact}
compact={isEditInPlace ? false : isCompact}
dropTargetIdOverride={getDndKitDropTargetId(
folderContentDroppableId,
navigationMenuItems.length,