Просмотр исходного кода

prevent settings and namespaces from bleeding between clusters

Justin Rhee 3 лет назад
Родитель
Сommit
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>