We have a requirement display the total sum for 2 columns
import MaterialTable, {MTableToolbar, MTableAction} from "material-table";
.
.
.
<MaterialTable
actions={transformActions()}
data={data}
editable={props.allowRowEditing ? {
onRowAdd: newData => onRowAdd(newData),
onRowDelete: oldData => onRowDelete(oldData),
onRowUpdate: (newData, oldData) => onRowUpdate(newData, oldData)
} : {}}
icons={tableIcons}
.
.
./>
I have a function to calculate the total and display the total; however on sorting the column, the row that displays the total moves around as well. Is there a way to fix the last row in material-table itself? Or are there any style hacks that can be done to achieve this?
Based on below issue report, there isn't any way as of now to achieve this using material table's properties
Note that I am not at liberty to use another table library.
I have tried to target the last row and set it's position as absolute as shown below
position: absolute;
height: 55px;
width: calc(100% - 1px);
bottom: 0;
while this fixes the last row in its position, I can't find a dynamic way to align the columns in accordance to the other rows.