Fix/single run panel show parent scrollbar (#5574)

Co-authored-by: StyleZhang <jasonapring2015@outlook.com>
This commit is contained in:
AIxGEEK
2024-06-25 16:41:49 +08:00
committed by GitHub
parent 2a0f03a511
commit 7c9e88dfb3
3 changed files with 14 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ import { getNodeInfoById, isSystemVar, toNodeOutputVars } from '@/app/components
import type { CommonNodeType, InputVar, ValueSelector, Var, Variable } from '@/app/components/workflow/types'
import { BlockEnum, InputVarType, NodeRunningStatus, VarType } from '@/app/components/workflow/types'
import { useStore as useAppStore } from '@/app/components/app/store'
import { useWorkflowStore } from '@/app/components/workflow/store'
import { getIterationSingleNodeRunUrl, singleNodeRun } from '@/service/workflow'
import Toast from '@/app/components/base/toast'
import LLMDefault from '@/app/components/workflow/nodes/llm/default'
@@ -164,6 +165,12 @@ const useOneStepRun = <T>({
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [data._isSingleRun])
const workflowStore = useWorkflowStore()
useEffect(() => {
workflowStore.getState().setShowSingleRunPanel(!!isShowSingleRun)
}, [isShowSingleRun])
const hideSingleRun = () => {
handleNodeDataUpdate({
id,