Skip to content

Commit

Permalink
fix: unnecessary count operations in Data Browser (#2250)
Browse files Browse the repository at this point in the history
  • Loading branch information
dplewis committed Sep 6, 2022
1 parent 91207d6 commit bfc1684
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dashboard/Data/Browser/Browser.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,11 @@ class Browser extends DashboardView {
if (this.props.params.appId !== nextProps.params.appId || !this.props.params.className) {
this.setState({ counts: {} });
Parse.Object._clearAllState();

nextProps.schema.dispatch(ActionTypes.FETCH)
.then(() => this.handleFetchedSchema());
}
this.prefetchData(nextProps, nextContext);
nextProps.schema.dispatch(ActionTypes.FETCH)
.then(() => this.handleFetchedSchema());
}
if (!nextProps.params.className && nextProps.schema.data.get('classes')) {
this.redirectToFirstClass(nextProps.schema.data.get('classes'), nextContext);
Expand Down

0 comments on commit bfc1684

Please sign in to comment.