]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Fix stale table actions 36859/head
authorTiago Melo <tmelo@suse.com>
Thu, 27 Aug 2020 17:31:48 +0000 (17:31 +0000)
committerTiago Melo <tmelo@suse.com>
Thu, 27 Aug 2020 17:36:27 +0000 (17:36 +0000)
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>
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts

index 59911fba2cb49431f68d2b5ec611b8f7d945d41d..51e6a317105eac1980f2336ff49dd778a4dcd6f1 100644 (file)
@@ -700,8 +700,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(column: CdTableColumn) {