From d7386c9f817c73c8d5dec16bcf8e99b206bbd4e4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20M=C3=BCller?= Date: Fri, 5 Jul 2019 11:55:33 +0200 Subject: [PATCH] mgr/dashboard: Refactor table mouseenter event listener MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: https://tracker.ceph.com/issues/40579 Signed-off-by: Stephan Müller --- .../src/app/shared/datatable/table/table.component.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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 ad94eeebae504..21c0dcd142176 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. -- 2.39.5