Browse Source

fix: DataPanel isFirstLoad state fix

Torkel Ödegaard 7 năm trước cách đây
mục cha
commit
16a2b207cc
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      public/app/features/dashboard/dashgrid/DataPanel.tsx

+ 2 - 1
public/app/features/dashboard/dashgrid/DataPanel.tsx

@@ -103,10 +103,11 @@ export class DataPanel extends Component<Props, State> {
       this.setState({
         loading: LoadingState.Done,
         response: resp,
+        isFirstLoad: false,
       });
     } catch (err) {
       console.log('Loading error', err);
-      this.setState({ loading: LoadingState.Error });
+      this.setState({ loading: LoadingState.Error, isFirstLoad: false });
     }
   };