-
Notifications
You must be signed in to change notification settings - Fork 127
3778 Fix delete dropdown propagation issue in ProjectListItem by adding event.stopPropagation #3790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -22,7 +22,7 @@ import {ChevronDownIcon, LayoutTemplateIcon, UploadIcon, WorkflowIcon} from 'luc | |||||
| import {useRef, useState} from 'react'; | ||||||
| import {useNavigate} from 'react-router-dom'; | ||||||
|
|
||||||
| const ProjectWorkflowList = ({project}: {project: Project}) => { | ||||||
| const ProjectWorkflowList = ({project, queryEnabled}: {project: Project; queryEnabled?: boolean}) => { | ||||||
| const [showWorkflowDialog, setShowWorkflowDialog] = useState(false); | ||||||
|
|
||||||
| const {captureProjectWorkflowCreated, captureProjectWorkflowImported} = useAnalytics(); | ||||||
|
|
@@ -47,7 +47,7 @@ const ProjectWorkflowList = ({project}: {project: Project}) => { | |||||
|
|
||||||
| const {data: workflows, isLoading: isProjectWorkflowsLoading} = useGetProjectWorkflowsQuery( | ||||||
| project.id!, | ||||||
| !!project.id | ||||||
| queryEnabled && !!project.id | ||||||
|
||||||
| queryEnabled && !!project.id | |
| (queryEnabled ?? true) && !!project.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Delete dropdown menu item now includes
event.stopPropagation(), but other dropdown menu items in the same menu (Publish, Edit, Duplicate, View Workflows, Share, Export, Pull Project from Git, Git Configuration) do not. While thehandleProjectListItemClickfunction checks for.dropdown-menu-itemselector to prevent propagation, this creates an inconsistency in how events are handled.For consistency and clarity, either all dropdown menu items should call
stopPropagation(), or none should (relying only on the selector-based check inhandleProjectListItemClick). If there's a specific issue with the Delete button that required this fix, the same issue likely affects other menu items as well.