I have a primereact DataTable
with a column that contains a button like this:
<Column header="Actions" body={
<div>
<Button icon="pi pi-pencil" className="p-button-rounded p-button-text"
onClick={(e) => {
//How do I obtain the row index here?
}
}/>
</div>
}>
</Column>
As you can see from the comment, I need to obtain the row index when the user clicks the button, because I want to perform an action on that specific row.
Is it possible? How do I do it?