fix(workflow): add setShowVariableInspectPanel for specific block types in useLastRun hook

This commit is contained in:
zhsama 2025-10-22 12:38:03 +08:00
parent 7acbe981e2
commit ccce135bf5
1 changed files with 3 additions and 1 deletions

View File

@ -205,7 +205,7 @@ const useLastRun = <T>({
})
}
const workflowStore = useWorkflowStore()
const { setInitShowLastRunTab } = workflowStore.getState()
const { setInitShowLastRunTab, setShowVariableInspectPanel } = workflowStore.getState()
const initShowLastRunTab = useStore(s => s.initShowLastRunTab)
const [tabType, setTabType] = useState<TabType>(initShowLastRunTab ? TabType.lastRun : TabType.settings)
useEffect(() => {
@ -318,6 +318,8 @@ const useLastRun = <T>({
const { isValid } = checkValid()
if (!isValid)
return
if (blockType === BlockEnum.TriggerWebhook || blockType === BlockEnum.TriggerPlugin)
setShowVariableInspectPanel(true)
if (isCustomRunNode) {
showSingleRun()
return