修复:项目组分类仅补齐未分类并在完成后刷新列表
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { api } from './api';
|
||||
import { WORKSPACE_INVALIDATED } from './pageCache';
|
||||
import type { DataWorkflowOperation } from './NoCodeDataTypes';
|
||||
|
||||
type StoredOperation = { operationId: string; startedAt: string };
|
||||
@@ -39,7 +40,7 @@ export function useDataWorkflowOperation(slot: string, onComplete?: (value: Data
|
||||
setOperation(current);
|
||||
const status = String(current.status || '').toUpperCase();
|
||||
if (status === 'COMPLETED' || status === 'FAILED') {
|
||||
if (status === 'COMPLETED') { savePendingId(null); callbackRef.current?.(current); }
|
||||
if (status === 'COMPLETED') { savePendingId(null); window.dispatchEvent(new Event(WORKSPACE_INVALIDATED)); callbackRef.current?.(current); }
|
||||
else setError(operationError(current));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user