fix: app sidebar project list dnd disabled when sidebar is collapsed (#4623)
This commit is contained in:
parent
c87749cbda
commit
5efa8264d8
1 changed files with 2 additions and 1 deletions
|
|
@ -186,7 +186,7 @@ export const ProjectSidebarListItem: React.FC<Props> = 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<Props> = observer((props) => {
|
|||
"group-hover:opacity-100": !isCollapsed,
|
||||
"cursor-not-allowed opacity-60": project.sort_order === null,
|
||||
flex: isMenuActive,
|
||||
hidden: isCollapsed,
|
||||
}
|
||||
)}
|
||||
ref={dragHandleRef}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue