From e8936417b3868c7ad945debb8444b82d29f734ab Mon Sep 17 00:00:00 2001 From: tchiotludo Date: Wed, 13 Oct 2021 21:16:07 +0200 Subject: [PATCH] fix(ui): connect cluster don't change on click close #781 --- .../containers/Connect/ConnectList/ConnectList.jsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/client/src/containers/Connect/ConnectList/ConnectList.jsx b/client/src/containers/Connect/ConnectList/ConnectList.jsx index ae5512bcf..8a20abfd9 100644 --- a/client/src/containers/Connect/ConnectList/ConnectList.jsx +++ b/client/src/containers/Connect/ConnectList/ConnectList.jsx @@ -55,6 +55,15 @@ class ConnectList extends Root { }); } + componentDidUpdate(prevProps, prevState) { + if (this.props.location.pathname !== prevProps.location.pathname) { + this.cancelAxiosRequests(); + this.renewCancelToken(); + + this.componentDidMount(); + } + } + async getConnectDefinitions() { const { clusterId, connectId, pageNumber } = this.state; const { search } = this.state.searchData; @@ -249,7 +258,7 @@ class ConnectList extends Root { }, cell: (obj, col) => { return ( -
+                  
                      JSON.stringify(JSON.parse(obj[col.accessor]), null, 2)}>
                       {obj[col.accessor]}