Преглед на файлове

feat(firmware): clean state data

Lind преди 4 години
родител
ревизия
1ba314f8c1
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  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) {
       setParams({ ...state.historyParams });
     }
+    return () => {
+      state.historyParams = undefined;
+      state.taskItem = undefined;
+    };
   }, []);
   const columns: ProColumns<HistoryItem>[] = [
     {