Reset ClusterStatus state when switching clusters (#5149)

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
Sebastian Malton authored and Jim Ehrismann committed 2022-04-05 11:53:24 -04:00
1 parent 65da0ce2d8
commit 6c4262820d
1 file changed
+7
@@ -55,6 +55,13 @@ export class ClusterStatus extends React.Component<Props> {
]);
}
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;