]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Update datatable only when necessary 37044/head
authorVolker Theile <vtheile@suse.com>
Tue, 8 Sep 2020 10:53:20 +0000 (12:53 +0200)
committerVolker Theile <vtheile@suse.com>
Tue, 8 Sep 2020 12:06:13 +0000 (14:06 +0200)
Fixes: https://tracker.ceph.com/issues/47359
Signed-off-by: Volker Theile <vtheile@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts

index 51e6a317105eac1980f2336ff49dd778a4dcd6f1..40b76d40a922998fe6b5ac7141599e8d21ec0076 100644 (file)
@@ -11,6 +11,7 @@ import {
   OnInit,
   Output,
   PipeTransform,
+  SimpleChanges,
   TemplateRef,
   ViewChild
 } from '@angular/core';
@@ -584,8 +585,10 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
     return _.isEmpty(css) ? undefined : css;
   }
 
-  ngOnChanges() {
-    this.useData();
+  ngOnChanges(changes: SimpleChanges) {
+    if (changes.data && changes.data.currentValue) {
+      this.useData();
+    }
   }
 
   setLimit(e: any) {