diff --git a/static/app/views/dashboards/detail.tsx b/static/app/views/dashboards/detail.tsx index c667ac11c941f5..c9ec02c8b97223 100644 --- a/static/app/views/dashboards/detail.tsx +++ b/static/app/views/dashboards/detail.tsx @@ -226,8 +226,13 @@ class DashboardDetail extends Component { if ( prevProps.organization !== this.props.organization || - prevProps.location !== this.props.location || - prevProps.router !== this.props.router || + // The only part of `location` used by `WidgetLegendSelectionState` is + // `unselectedSeries`. Don't bother comparing anything else. Once this + // component is a functional component, we'll move the selection state + // into a hook, and make sure it doesn't re-render too much. + prevProps.location.query.unselectedSeries !== + this.props.location.query.unselectedSeries || + prevProps.navigate !== this.props.navigate || prevProps.dashboard !== this.props.dashboard ) { this.setState({