How to highlight a Row in the mantine react table? #405
24AMK10
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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.
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),
})}
/>
Beta Was this translation helpful? Give feedback.
All reactions