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(
|
return combine(
|
||||||
draggable({
|
draggable({
|
||||||
element,
|
element,
|
||||||
canDrag: () => !disableDrag,
|
canDrag: () => !disableDrag && !isCollapsed,
|
||||||
dragHandle: dragHandleElement ?? undefined,
|
dragHandle: dragHandleElement ?? undefined,
|
||||||
getInitialData: () => ({ id: projectId, dragInstanceId: "PROJECTS" }),
|
getInitialData: () => ({ id: projectId, dragInstanceId: "PROJECTS" }),
|
||||||
onDragStart: () => {
|
onDragStart: () => {
|
||||||
|
|
@ -306,6 +306,7 @@ export const ProjectSidebarListItem: React.FC<Props> = observer((props) => {
|
||||||
"group-hover:opacity-100": !isCollapsed,
|
"group-hover:opacity-100": !isCollapsed,
|
||||||
"cursor-not-allowed opacity-60": project.sort_order === null,
|
"cursor-not-allowed opacity-60": project.sort_order === null,
|
||||||
flex: isMenuActive,
|
flex: isMenuActive,
|
||||||
|
hidden: isCollapsed,
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
ref={dragHandleRef}
|
ref={dragHandleRef}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue