mirror of https://github.com/langgenius/dify.git
pref: reduce next step components reRender (#28783)
This commit is contained in:
parent
1f72571c06
commit
5f2e0d6347
|
|
@ -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>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue