mgr/dashboard: Refactor table mouseenter event listener

Fixes: https://tracker.ceph.com/issues/40579
Signed-off-by: Stephan Müller <smueller@suse.com>
This commit is contained in:
Stephan Müller 2019-07-05 11:55:33 +02:00
parent efc79990b2
commit d7386c9f81

View File

@ -179,14 +179,7 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
ngOnInit() {
// ngx-datatable triggers calculations each time mouse enters a row,
// this will prevent that.
window.addEventListener(
'mouseenter',
function(event) {
event.stopPropagation();
},
true
);
window.addEventListener('mouseenter', (event) => event.stopPropagation(), true);
this._addTemplates();
if (!this.sorts) {
// Check whether the specified identifier exists.