fix: prevent sidebar drag lock during inline rename (#680) (#681)

This commit is contained in:
Iuliia Ivashko
2026-03-17 02:46:26 +02:00
committed by GitHub
parent de50283bdf
commit 3041f53e24
4 changed files with 16 additions and 3 deletions
@@ -60,6 +60,7 @@ type Props = {
settingsAutoCreateWorktree: boolean;
getOrderedGroups: (projectId: string, groups: SessionGroup[]) => SessionGroup[];
setGroupOrderByProject: React.Dispatch<React.SetStateAction<Map<string, string[]>>>;
isInlineEditing: boolean;
};
export function SidebarProjectsList(props: Props): React.ReactNode {
@@ -198,7 +199,7 @@ export function SidebarProjectsList(props: Props): React.ReactNode {
{orderedGroups.map((group) => {
const groupKey = `${projectKey}:${group.id}`;
return (
<SortableGroupItem key={group.id} id={group.id}>
<SortableGroupItem key={group.id} id={group.id} disabled={props.isInlineEditing}>
{props.renderGroupSessions(group, groupKey, projectKey)}
</SortableGroupItem>
);
@@ -303,8 +303,9 @@ export const SortableProjectItem: React.FC<SortableProjectItemProps> = ({
const SortableGroupItemBase: React.FC<{
id: string;
disabled?: boolean;
children: React.ReactNode;
}> = ({ id, children }) => {
}> = ({ id, disabled = false, children }) => {
const {
attributes,
listeners,
@@ -312,7 +313,7 @@ const SortableGroupItemBase: React.FC<{
transform,
transition,
isDragging,
} = useSortable({ id });
} = useSortable({ id, disabled });
return (
<div