From: Stephan Müller Date: Fri, 5 Jul 2019 09:55:33 +0000 (+0200) Subject: mgr/dashboard: Refactor table mouseenter event listener X-Git-Tag: v15.1.0~2198^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d7386c9f817c73c8d5dec16bcf8e99b206bbd4e4;p=ceph.git mgr/dashboard: Refactor table mouseenter event listener Fixes: https://tracker.ceph.com/issues/40579 Signed-off-by: Stephan Müller --- 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 ad94eeebae5..21c0dcd1421 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 @@ -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.