I am currently working on a React application that utilizes Material-UI enhanced table, which is based on react-table. I have been trying to customize the styling of their rows.
According to the documentation (https://material-ui.com/api/table-row/), it states that in the TableRow component, the prop "classes" should be used to modify the style. However, in the Material-UI code, props are accessed like this:
<TableRow {...row.getRowProps()}>
My issue is how can I incorporate the "classes" prop since the TableRow props are automatically added? I assumed I needed to do something like this:
<TableRow classes="rowStyle ">
Where "rowStyle" is defined as:
const styles = {
rowStyle : {
padding: 10,
border: "1px solid red"
}
};
Clearly, this approach won't work. How can I include "classes" in the getRowProps() function and apply the new style?
I have not been able to find a clear explanation or example in the official documentation or on StackOverflow.
Thank you for any assistance provided.
EnhancedTable.js:
import React from "react";
// Remaining code omitted for brevity...