Skip to content

Commit a407ca3

Browse files
ivicackresimir-coko
authored andcommitted
3778 client - Fix delete dropdown propagation issue in ProjectListItem by adding event.stopPropagation
1 parent e3e41c9 commit a407ca3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

client/src/pages/automation/projects/components/project-list/ProjectListItem.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ import {
6262
UploadIcon,
6363
WorkflowIcon,
6464
} from 'lucide-react';
65-
import {useCallback, useRef, useState} from 'react';
65+
import {MouseEvent, useCallback, useRef, useState} from 'react';
6666
import {Link, useNavigate, useSearchParams} from 'react-router-dom';
6767

6868
import TagList from '../../../../../shared/components/TagList';
@@ -493,7 +493,11 @@ const ProjectListItem = ({project, projectGitConfiguration, remainingTags}: Proj
493493

494494
<DropdownMenuItem
495495
className="dropdown-menu-item-destructive"
496-
onClick={() => setShowDeleteDialog(true)}
496+
onClick={(event: MouseEvent) => {
497+
setShowDeleteDialog(true);
498+
499+
event.stopPropagation();
500+
}}
497501
>
498502
<Trash2Icon /> Delete
499503
</DropdownMenuItem>

0 commit comments

Comments
 (0)