All Ideas

Idea Details

Post an Idea
540  Points
Idea has been posted. Give it an upvote or downvote.

Lightning Components: handling row and cell events in tables

Visualforce & Aura

Currently, if I want to create a Lightning Component with a table using a base component, there are two options as far as I know: lightning:datatable and lightning:treeGrid. Both of them support row actions (via onrowaction) and row selections (via onrowselection), but none of them support row events (the ability to react to clicks wherever within a row) or cell events (the ability to react to clicks in specific cells). This prevents me from implementing more custom behaviour like, for example, clicking on a cell to then re-render the table showing more granular details based on that cell.

The same limitation is present both in Aura and LWC versions of these components.

It would be pretty useful if these components had functionality like:
- onrowclick: to handle a click in a row
- oncellclick: this could be part of the column properties (that can be found here:, allowing us to specify custom behaviour for each cell

These at the very least, but they could be more generic to support different kinds of events, for example, allowing us to register handlers to arbitrary events per row or per cell.

Merge Idea · Flag

  • Upvotes
  • Downvotes



from AppExchange


Help us to keep IdeaExchange clean by pointing out overlapping ideas. We'll investigate your suggestion and merge the ideas if it makes sense.



Thanks for your merge suggestion. We will review it shortly and merge the ideas if applicable.

Salesforce takes abuse situations very seriously. Examples of abuse include but are not limited to posting of offensive language or fraudulent statements. To help us process your request as quickly as possible, please fill out the form below describing the situation. For privacy and security reasons, the final outcome of an abuse case may not be revealed to the person who reported it.


Thank you for your feedback. We take abuse seriously and will investigate this issue and take appropriate action.