Browse Source

fix filter bug

Erik Sundell 7 năm trước cách đây
mục cha
commit
fd88f637b2

+ 3 - 1
public/app/plugins/datasource/stackdriver/components/Filter.tsx

@@ -57,10 +57,12 @@ export class Filter extends React.Component<Props, State> {
   }
   }
 
 
   componentDidUpdate(prevProps: Props) {
   componentDidUpdate(prevProps: Props) {
+    const scope = this.component.getScope();
     if (prevProps.metricType !== this.props.metricType) {
     if (prevProps.metricType !== this.props.metricType) {
-      const scope = this.component.getScope();
       scope.loading = this.loadLabels(scope);
       scope.loading = this.loadLabels(scope);
     }
     }
+    scope.filters = this.props.filters;
+    scope.groupBys = this.props.groupBys;
   }
   }
 
 
   componentWillUnmount() {
   componentWillUnmount() {