Browse Source

fix(dashboards): Bind state setter (#75076)

I forgot that when you pass along functions like this, you need to call
`.bind(this)`, because `this` changes depending on the callsite.
Nar Saynorath 7 months ago
parent
commit
0bfc7d4265
1 changed files with 1 additions and 1 deletions
  1. 1 1
      static/app/views/dashboards/detail.tsx

+ 1 - 1
static/app/views/dashboards/detail.tsx

@@ -733,7 +733,7 @@ class DashboardDetail extends Component<Props, State> {
               splitDecision,
               dashboard,
               modifiedDashboard,
-              stateSetter: this.setState,
+              stateSetter: this.setState.bind(this),
               onDashboardUpdate,
             });
           },