I am using mantine react table in my application for showing the data on UI. In this single selection table i want to get the selected row details and want to call a function in which i need to set one state with the help of selected row details.
const someFunction = () => {
props.selectedRow({
id: rowDetails.id,
rowData: rowDetails,
});
};
<MantineReactTable
columns={tableHeader}
data={tableData}
enableColumnActions={true}
enableColumnFilters={true}
enablePagination={true}
enableSorting={true}
enableTopToolbar={true}
enableRowSelection={true}
muiSelectCheckboxProps={{
color: 'secondary',
}}
enableStickyHeader
enableStickyFooter
enableSelectAll={false}
enableMultiRowSelection={false}
/>
So i want to call someFunction everytime i select a row and want to set props.selectedRow
value with the current selected row value. How can i do that?