Sfoglia il codice sorgente

feat(firmware): clean state data

Lind 4 anni fa
parent
commit
1ba314f8c1
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      src/pages/device/Firmware/Detail/History/index.tsx

+ 4 - 0
src/pages/device/Firmware/Detail/History/index.tsx

@@ -13,6 +13,10 @@ const History = () => {
     if (state.historyParams) {
     if (state.historyParams) {
       setParams({ ...state.historyParams });
       setParams({ ...state.historyParams });
     }
     }
+    return () => {
+      state.historyParams = undefined;
+      state.taskItem = undefined;
+    };
   }, []);
   }, []);
   const columns: ProColumns<HistoryItem>[] = [
   const columns: ProColumns<HistoryItem>[] = [
     {
     {