Skip to content

Commit

Permalink
fix(ui): Exception when changing cluster on TopicList (#962)
Browse files Browse the repository at this point in the history
close ##835
  • Loading branch information
EdwinFajardoBarrera authored Dec 22, 2021
1 parent 4e29c28 commit 9f526fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions client/src/containers/Connect/ConnectList/ConnectList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ConnectList extends Root {
const query = new URLSearchParams(this.props.location.search);
this.setState({
searchData: { search: (query.get('search'))? query.get('search') : searchData.search },
pageNumber: (query.get('page'))? parseInt(query.get('page')) : parseInt(pageNumber)
pageNumber: (query.get('page')) ? parseInt(query.get('page')) : parseInt(pageNumber)
}, () => {
this.getConnectDefinitions();
});
Expand All @@ -60,7 +60,9 @@ class ConnectList extends Root {
this.cancelAxiosRequests();
this.renewCancelToken();

this.componentDidMount();
this.setState({ pageNumber: 1 }, () => {
this.componentDidMount();
});
}
}

Expand Down
4 changes: 3 additions & 1 deletion client/src/containers/Topic/TopicList/TopicList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ class TopicList extends Root {
this.cancelAxiosRequests();
this.renewCancelToken();

this._initializeVars(this.getTopics);
this.setState({ pageNumber: 1 }, () => {
this._initializeVars(this.getTopics);
});
}
}

Expand Down

0 comments on commit 9f526fd

Please sign in to comment.