ngx-datatable icon indicating copy to clipboard operation
ngx-datatable copied to clipboard

(select) event emitter conflicts with DOM Event.

Open QuentinFchx opened this issue 8 years ago • 4 comments

I'm submitting a ... (check one with "x")

[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

This library is using EventEmitters named after the select DOM Event (see here) When using a custom header (with a text input to filter rows for instance), it conflicts with basic DOM behavior (ie: double click to select all the text of the input).

Expected behavior

We should not use the same names that native DOM Events

Reproduction of the problem

http://plnkr.co/edit/7zAbklltoJWoCbN1btUL?p=info

What is the motivation / use case for changing the behavior?

Conflicts with native DOM Events names should be avoided.

Please tell us about your environment:

  • Table version: 9.3.1
  • Angular version: 4.3.3
  • Browser: all
  • Language: all

EDIT: relates to #757

QuentinFchx avatar Aug 07 '17 09:08 QuentinFchx

Perhaps we should rename the event. Do you have any suggestions?

amcdnl avatar Aug 07 '17 13:08 amcdnl

I can fix my own implementation that would stop the propagation of the select event.

I understand that the select keyword seems suited for that case, and I'm not sure overriding native events name is a good idea.

Renaming the event will lead to a breaking-change (and we need to find a replacement name), so I guess it's a trade-off.

QuentinFchx avatar Aug 07 '17 15:08 QuentinFchx

Hi! Same problem here

Lempkin avatar Apr 09 '20 08:04 Lempkin

Hello there! I'd like to suggest creating a new 'rowSelect' event while deprecating the old 'select' event. This way, we'll have two equivalent events, avoiding any breaking changes and providing a solution to this issue

mmfKupl avatar Nov 29 '23 12:11 mmfKupl