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.

pref: reduce next step components reRender (#28783)

Joel5f2e0d63474c
diff --git a/web/app/components/workflow/nodes/_base/components/workflow-panel/index.tsx b/web/app/components/workflow/nodes/_base/components/workflow-panel/index.tsx
index 0d3aebd06dd..bcc108daa78 100644
--- a/web/app/components/workflow/nodes/_base/components/workflow-panel/index.tsx
+++ b/web/app/components/workflow/nodes/_base/components/workflow-panel/index.tsx
@@ -365,6 +365,10 @@ const BasePanel: FC<BasePanelProps> = ({
return !pluginDetail ? null : <ReadmeEntrance pluginDetail={pluginDetail as any} className='mt-auto' />
}, [data.type, currToolCollection, currentDataSource, currentTriggerPlugin])
+ const selectedNode = useMemo(() => ({
+ id,
+ data,
+ }) as Node, [id, data])
if (logParams.showSpecialResultPanel) {
return (
<div className={cn(
@@ -628,7 +632,7 @@ const BasePanel: FC<BasePanelProps> = ({
<div className='system-xs-regular mb-2 text-text-tertiary'>
{t('workflow.panel.addNextStep')}
</div>
- <NextStep selectedNode={{ id, data } as Node} />
+ <NextStep selectedNode={selectedNode} />
</div>
)
}