From 5efa8264d82186e31ff952508421e731c224b0de Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Tue, 28 May 2024 16:49:39 +0530 Subject: [PATCH] fix: app sidebar project list dnd disabled when sidebar is collapsed (#4623) --- web/components/project/sidebar-list-item.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/components/project/sidebar-list-item.tsx b/web/components/project/sidebar-list-item.tsx index 4d45a515f..1d8a7a20c 100644 --- a/web/components/project/sidebar-list-item.tsx +++ b/web/components/project/sidebar-list-item.tsx @@ -186,7 +186,7 @@ export const ProjectSidebarListItem: React.FC = observer((props) => { return combine( draggable({ element, - canDrag: () => !disableDrag, + canDrag: () => !disableDrag && !isCollapsed, dragHandle: dragHandleElement ?? undefined, getInitialData: () => ({ id: projectId, dragInstanceId: "PROJECTS" }), onDragStart: () => { @@ -306,6 +306,7 @@ export const ProjectSidebarListItem: React.FC = observer((props) => { "group-hover:opacity-100": !isCollapsed, "cursor-not-allowed opacity-60": project.sort_order === null, flex: isMenuActive, + hidden: isCollapsed, } )} ref={dragHandleRef}