onMeetingTitleClick is working when i use onClick but it only works for that specific column.
I'm trying to get it working for the entire row using onRowClicked but i don t think i'm doing it right. Any ideas?
const MeetingsTable = ({ meetings, onMeetingTitleClick }) => {
...
const columns = [
{
name: 'Title',
cell: row => (
<div data-tag="allowRowEvents">
<div aria-hidden="true" onClick={e => onMeetingTitleClick(e, row.id)}>
{row.name}
</div>
</div>
),
},
];
const onRowClicked = () => (result.map(result => (e => onMeetingTitleClick(e, result.id))));
return (
<DataTable
columns={columns}
data={result}
onRowClicked={onRowClicked}
/>
);
... Omitted other values
Reference lib: https://github.com/jbetancur/react-data-table-component