Skip to content

Commit 856c52e

Browse files
committed
ref(admin): Fix thrashing on stat charts
1 parent 872051e commit 856c52e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/sentry/static/sentry/app/components/internalStatChart.jsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,14 @@ class InternalStatChart extends React.Component {
3434
return this.state.loading !== nextState.loading;
3535
}
3636

37-
componentDidUpdate() {
38-
this.fetchData();
37+
componentDidUpdate(prevProps) {
38+
if (
39+
prevProps.since !== this.props.since ||
40+
prevProps.stat !== this.props.stat ||
41+
prevProps.resolution !== this.props.resolution
42+
) {
43+
this.fetchData();
44+
}
3945
}
4046

4147
fetchData() {

0 commit comments

Comments
 (0)