mantine-datatable
mantine-datatable copied to clipboard
Is it possible to change the line color dynamically?
I currently have the following table
<DataTable
fetching={isValidating && !records.length}
loaderBackgroundBlur={1}
rowStyle={({ paid }) =>
(theme) => ({
backgroundColor: paid ? theme.colors.green[0] : theme.colors.white
})}
....
When the data comes from the database this works perfectly. The line turns green if the paid status is true.
However, when the user marks it as paid or not paid, the line does not change color. It only changes color if I reload the data and I don't want to do that for usability reasons, since the default ordering is by paid status. In other words, if I reload the data, the item goes down, causing the user to lose sight of it.
Is it possible to control the lines externally?