Преглед изворни кода

update gauge on remove threshold

Peter Holmberg пре 7 година
родитељ
комит
60ec00ae52
1 измењених фајлова са 6 додато и 3 уклоњено
  1. 6 3
      public/app/plugins/panel/gauge/Thresholds.tsx

+ 6 - 3
public/app/plugins/panel/gauge/Thresholds.tsx

@@ -46,9 +46,12 @@ export default class Thresholds extends PureComponent<PanelOptionsProps<OptionsP
   };
 
   onRemoveThreshold = threshold => {
-    this.setState(prevState => ({
-      thresholds: prevState.thresholds.filter(t => t !== threshold),
-    }));
+    this.setState(
+      prevState => ({
+        thresholds: prevState.thresholds.filter(t => t !== threshold),
+      }),
+      () => this.updateGauge()
+    );
   };
 
   onChangeThresholdValue = (event, threshold) => {