]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Fix stale table actions 36899/head
authorTiago Melo <tmelo@suse.com>
Thu, 27 Aug 2020 17:31:48 +0000 (17:31 +0000)
committerLaura Paduano <lpaduano@suse.com>
Mon, 31 Aug 2020 13:09:09 +0000 (15:09 +0200)
If we don't emit the select event, the action button can become stale and not
update when the data changes.

This fixes a regression introduced in 31e9bbb9b308277d2f89390d5ff62f13457d69cb

Fixes: https://tracker.ceph.com/issues/47175
Signed-off-by: Tiago Melo <tmelo@suse.com>
(cherry picked from commit c9a73185a9d8348d0a5e72b76b6bcabd5ac34da8)

src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts

index c2fe650da769592aa411152c96c019de68ce4703..1fb0b228654b0a81d7c65a0a1e99fb7e1c737b41 100644 (file)
@@ -685,8 +685,8 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
     // https://github.com/swimlane/ngx-datatable/issues/899
     if (_.has($event, 'selected')) {
       this.selection.selected = $event['selected'];
-      this.updateSelection.emit(_.clone(this.selection));
     }
+    this.updateSelection.emit(_.clone(this.selection));
   }
 
   toggleColumn($event: any) {