question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Activate event is firing on hovering over a row

See original GitHub issue

I’m submitting a … [X ] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter


**Current behavior**
Activate event is firing on mouseenter, i.e. when hovering over a row.

**Expected behavior**
Activate event should only fire on click

**Reproduction of the problem**
A ngx-datatable with `(activate)="onActivate($event)"`

**What is the motivation / use case for changing the behavior?**
Trying to subscribe to the click event of a row.  
Activate is now firing when the user hovers on a row.
This was not the behavior in prior versions (<10)

**Please tell us about your environment:**

* **Table version:** 10.2

* **Angular version:** 4.4

* **Browser:**  Chrome 

* **Language:** All

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
thanhngvptcommented, Jun 5, 2018

hi all, How can i disable this feature. this is my code for activate handler

onActivate(event) { console.log('onActivate'); if (event.type === 'mouseover') { console.log('onActivate.mouseover'); event.preventDefault(); event.stopPropagation(); return; } }

and usage as <ngx-datatable #table (activate)="onActivate($event)"></ngx-datable>

But it still not work, i’m not sure about the above way for filter event. Thanks.

2reactions
555eacommented, Feb 12, 2018

mouseenter event is also causing performance overhead, just put a breakpoint in a rowClass method it will be called on every mouseenter for every table row item. Like if there’s no virtualisation, rowClass will be called 100 times for 100 items on a single mouseenter

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hover over row event not firing in ag-grid - Stack Overflow
The issue is each time row is hovered over the cellMouseOver event is not fired. Is cellMouseOver event correct event to try in...
Read more >
Element: mouseenter event - Web APIs | MDN
The mouseenter event is fired at an Element when a pointing device (usually a mouse) is initially moved so that its hotspot is...
Read more >
.mouseover() | jQuery API Documentation
Description: Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element. version added: 1.0.mouseover( handler ). handler....
Read more >
JavaScript - Bootstrap
Transition.js is a basic helper for transitionEnd events as well as a CSS transition emulator. It's used by the other plugins to check...
Read more >
Moving the mouse: mouseover/out, mouseenter/leave
The mouseover event occurs when a mouse pointer comes over an element, and mouseout – when it leaves. These events are special, because...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found