I want to capture the onClick event and get the id value of a row

Hello @Kenz,

You can capture the id value of row using the builder state and action

Action handlers introduce an additional object you can access: event.

This event object represents the HTML event triggered by the selected action. You can leverage event to access the event’s target element or invoke methods such as preventDefault or stopPropagation:

// access the value attribute (ie from an input)
// and store it in builder state
state.someStateProp = event.currentTarget.value;

// if you have a link with an href, you might want to stop
// default browser navigation and handle this yourself
event.preventDefault();
var targetElementId = event.currentTarget.id;
var elementToHide = document.getElementById(targetElementId);
elementToHide.style.display = 'none';

For reference, please refer to the below links