temp fix: tab change caused empty the nodes

This commit is contained in:
Joel
2026-01-14 17:20:22 +08:00
parent d17a92f713
commit be5a4cf5e3
3 changed files with 32 additions and 8 deletions

View File

@ -56,6 +56,7 @@ export const useWorkflowInit = () => {
} = useWorkflowConfig('/files/upload', handleUpdateWorkflowFileUploadConfig)
const handleGetInitialWorkflowData = useCallback(async () => {
setIsLoading(true)
try {
const res = await fetchWorkflowDraft(`/apps/${appDetail.id}/workflows/draft`)
setData(res)
@ -116,6 +117,7 @@ export const useWorkflowInit = () => {
useEffect(() => {
handleGetInitialWorkflowData()
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
const handleFetchPreloadData = useCallback(async () => {
@ -156,5 +158,6 @@ export const useWorkflowInit = () => {
data,
isLoading: isLoading || isFileUploadConfigLoading,
fileUploadConfigResponse,
reload: handleGetInitialWorkflowData,
}
}