I want to highlight the whole row of the react mantine table on given condition for example if a value is mismatch in a cell I want to highlight the whole row.
my code looks like
this is I tried
const getRowStyle = (row) => {
// return hasMismatch(row)
// ? { backgroundColor: 'rgba(255, 0, 0, 0.1)' }
// : {};
return { backgroundColor: 'red' }
};
<MantineTable
columns={columns}
initialData={skus}
enableRowSelection={false}
loading={loading}
showSelectedToggle={false}
hideSelectColumn={true}
showResetAll={false}
pageSize={10}
enableColumnFilter={false}
enableFilters={false}
columnFilterDisplayMode={false}
getRowProps={(row) => ({
style: getRowStyle(row),
})}
/>
I tried to do it in the < Cell > but no help.
If anyone can help me with some doc or code that will be huge help