Skip to content

Commit

Permalink
fix(ui): connect cluster don't change on click
Browse files Browse the repository at this point in the history
close #781
  • Loading branch information
tchiotludo committed Oct 24, 2021
1 parent b8e6667 commit e893641
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion client/src/containers/Connect/ConnectList/ConnectList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -249,7 +258,7 @@ class ConnectList extends Root {
},
cell: (obj, col) => {
return (
<pre class="mb-0 khq-data-highlight">
<pre className="mb-0 khq-data-highlight">
<code onClick={() => JSON.stringify(JSON.parse(obj[col.accessor]), null, 2)}>
{obj[col.accessor]}
</code>
Expand Down

0 comments on commit e893641

Please sign in to comment.