Closed joshuadkitenge closed 3 days ago
Another alternative I just found is using a custom component to force it to the center e.g.
renderEmptyRowsFallback: (props) => {
return (
<Box justifyContent="center" alignItems="center" textAlign="center">
{noResultsTxt}
</Box>
);
},
The styling would need some slight adjusting though, e.g. the text colour would probably need to be text.secondary to get the lighter grey. Then we can at least keep the same component, and the centering will need to be via the window width instead of the table width to avoid
We managed to trace it to enableTopToolbar: false
- A value of undefined defaults to true which works fine, but with a value of false it breaks. The above comment can fix it partially however while loading the message reverts back to the default component with the same issue so its not a suitable solution. The catalogueCategoryTableView is fine, even though it too has a value of false. Ultimately it appears to be due to this line in MRT https://github.com/KevinVandy/material-react-table/blob/e6531fcd287fae2d4e39aba930be256a3a75453a/packages/material-react-table/src/body/MRT_TableBody.tsx#L260.
not an issue anymore as we use TopToolbar in all tables
@joshuadkitenge It's still in the dense items table or is that fixed as well now?
The items dense table isn't used anywhere. The dense view was meant to be use for the items table in systems. I don't think it worth removing. I know another feature I can use this view for later.
The items dense table isn't used anywhere. The dense view was meant to be use for the items table in systems. I don't think it worth removing. I know another feature I can use this view for later.
Sure as long as we don't forget about this if we use it again. It may be fixed by MRT at some point and then we can be sure.
Not sure why but the position of the no results text changes when the error is shown.
_Originally posted by @joelvdavies in https://github.com/ral-facilities/inventory-management-system/pull/177#discussion_r1422594143_