aslagle / reactive-table

A reactive table designed for Meteor
https://atmospherejs.com/aslagle/reactive-table
Other
328 stars 137 forks source link

How to handle click event on an item inside tr #439

Closed brascene closed 8 years ago

brascene commented 8 years ago

I'm trying to achieve an event handling on span item inside a "tr - td" (edit icon), which will take me on another page for edit form. For now, I am able to achieve this successfully while clicking on "td" element where my span icon is placed, but if I click on the icon itself, nothing happens. Can you help me with this, is it possible to catch this event and still be able to catch the row object? Thanks!

aslagle commented 8 years ago

Take a look at the second example here: https://github.com/aslagle/reactive-table#using-events. You can add event handling to the tr element, but check the actual element that was clicked inside the event handler.

brascene commented 8 years ago

That example solved my issue, thanks! I made a mistake by checking event target class name as class name of field cell class :) Thanks!