Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

feat: add disabled support to tooltip-plus component (#7036)

NFish1a302ca95740
diff --git a/web/app/components/base/tooltip-plus/index.tsx b/web/app/components/base/tooltip-plus/index.tsx
index b8336904694..1f8a091fa5c 100644
--- a/web/app/components/base/tooltip-plus/index.tsx
+++ b/web/app/components/base/tooltip-plus/index.tsx
@@ -8,6 +8,7 @@ import { PortalToFollowElem, PortalToFollowElemContent, PortalToFollowElemTrigge
export type TooltipProps = {
position?: Placement
triggerMethod?: 'hover' | 'click'
+ disabled?: boolean
popupContent: React.ReactNode
children: React.ReactNode
hideArrow?: boolean
@@ -23,6 +24,7 @@ const arrow = (
const Tooltip: FC<TooltipProps> = ({
position = 'top',
triggerMethod = 'hover',
+ disabled = false,
popupContent,
children,
hideArrow,
@@ -67,7 +69,7 @@ const Tooltip: FC<TooltipProps> = ({
return (
<PortalToFollowElem
- open={open}
+ open={disabled ? false : open}
onOpenChange={setOpen}
placement={position}
offset={offset ?? 10}