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

prevent settings and namespaces from bleeding between clusters

Justin Rhee преди 3 години
родител
ревизия
18a10ea3bb
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      dashboard/src/main/home/cluster-dashboard/dashboard/Dashboard.tsx

+ 5 - 0
dashboard/src/main/home/cluster-dashboard/dashboard/Dashboard.tsx

@@ -71,6 +71,11 @@ export const Dashboard: React.FunctionComponent = () => {
     }
   }, [location]);
 
+  // Need to reset tab to reset views that don't auto-update on cluster switch (esp namespaces + settings)
+  useEffect(() => {
+    setCurrentTab("nodes");
+  }, [context.currentCluster]);
+
   return (
     <>
       <TitleSection>