From: Tiago Melo Date: Thu, 27 Aug 2020 17:31:48 +0000 (+0000) Subject: mgr/dashboard: Fix stale table actions X-Git-Tag: v15.2.9~122^2~104^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F36899%2Fhead;p=ceph.git mgr/dashboard: Fix stale table actions 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 (cherry picked from commit c9a73185a9d8348d0a5e72b76b6bcabd5ac34da8) --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts index c2fe650da769..1fb0b228654b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts @@ -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) {