Browse Source

fix(demo): node report status not updating (#1015)

lq9958 1 tháng trước cách đây
mục cha
commit
a7f36767aa

+ 9 - 1
apps/demo-free-layout/src/components/testrun/node-status-bar/index.tsx

@@ -3,6 +3,11 @@
  * SPDX-License-Identifier: MIT
  */
 
+/**
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
+ * SPDX-License-Identifier: MIT
+ */
+
 import { useEffect, useState } from 'react';
 
 import { NodeReport } from '@flowgram.ai/runtime-interface';
@@ -22,7 +27,10 @@ const useNodeReport = () => {
       if (nodeReport.id !== node.id) {
         return;
       }
-      setReport(nodeReport);
+      setReport((prev) =>({
+        ...prev,
+        ...nodeReport,
+      }));
     });
     const resetDisposer = runtimeService.onReset(() => {
       setReport(undefined);