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)
Conflicts:
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts
One of the methods used still requires 1 parameter in nautilus
[cssClasses]="paginationClasses"
[selectionType]="selectionType"
[selected]="selection.selected"
- (select)="onSelect()"
+ (select)="onSelect($event)"
[sorts]="userConfig.sorts"
(sort)="changeSorting($event)"
[columns]="tableColumns"
return;
}
this.selection.selected = newSelected;
- this.onSelect();
+ this.onSelect(this.selection);
}
onSelect($event: any) {
// 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) {