Reset ClusterStatus state when switching clusters (#5149)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-04-01 12:02:04 -04:00
1 parent cfc702f89f
commit 85f2ce7504
1 file changed
+7
@@ -60,6 +60,13 @@ class NonInjectedClusterStatus extends React.Component<ClusterStatusProps & Depe
]);
}
componentDidUpdate(prevProps: Readonly<ClusterStatusProps>): void {
if (prevProps.cluster.id !== this.props.cluster.id) {
this.isReconnecting = false;
this.authOutput = [];
}
}
reconnect = async () => {
this.authOutput = [];
this.isReconnecting = true;