]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Refactor table mouseenter event listener 28879/head
authorStephan Müller <smueller@suse.com>
Fri, 5 Jul 2019 09:55:33 +0000 (11:55 +0200)
committerStephan Müller <smueller@suse.com>
Fri, 5 Jul 2019 11:39:29 +0000 (13:39 +0200)
Fixes: https://tracker.ceph.com/issues/40579
Signed-off-by: Stephan Müller <smueller@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts

index ad94eeebae50438c42006a3929d1d218bad26723..21c0dcd14217604ff06f2112e289625d9969020c 100644 (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.