swimlane / ngx-datatable

✨ A feature-rich yet lightweight data-table crafted for Angular
http://swimlane.github.io/ngx-datatable/
MIT License
4.62k stars 1.68k forks source link

Column reference when active mouseenter event. #1009

Open nssantos opened 6 years ago

nssantos commented 6 years ago
[ ] bug report => search github for a similar issue or PR before submitting
[ X ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior The active event mousenter only return row reference, It'd be good if it also returned the column.

{type: "mouseenter", event: MouseEvent, row: {…}, rowElement: datatable-body-row.datatable-body-row.datatable-row-even}
event
:
MouseEvent {isTrusted: true, screenX: 377, screenY: 226, clientX: 377, clientY: 136, …}
row
:
{name: "Ethel Price", gender: "female", company: "Johnson, Johnson and Partners, LLC CMP DDC", age: 22}
rowElement
:
datatable-body-row.datatable-body-row.datatable-row-even
type
:
"mouseenter"
__proto__
:
Object

Expected behavior Get the column reference when active event mouseenter.

Reproduction of the problem http://swimlane.github.io/ngx-datatable/#cell-selection

What is the motivation / use case for changing the behavior? I already use multi checkbox selection, and I'd like to open another view when click on specific cell, and not when click on row.

Please tell us about your environment:

lajon9 commented 6 years ago

I would really find this useful.