Merge branch 'table_sorting' into staging_environment
This commit is contained in:
commit
e978a26060
2 changed files with 2 additions and 2 deletions
|
|
@ -167,7 +167,7 @@ export default function CableEstimator() {
|
||||||
//having the search filter in here is quite inefficient as it will filter each time you change pages as well
|
//having the search filter in here is quite inefficient as it will filter each time you change pages as well
|
||||||
//TODO: re-work the filter so it only filters when the search is changed
|
//TODO: re-work the filter so it only filters when the search is changed
|
||||||
|
|
||||||
//
|
// sort the array according to orderBy
|
||||||
clone.sort((a, b) => {
|
clone.sort((a, b) => {
|
||||||
if (Object.keys(a).includes(orderBy)) {
|
if (Object.keys(a).includes(orderBy)) {
|
||||||
let by = orderBy as keyof jsonBin
|
let by = orderBy as keyof jsonBin
|
||||||
|
|
|
||||||
|
|
@ -460,7 +460,7 @@ export default function ResponsiveTable<T extends Object>(props: Props<T>) {
|
||||||
onClick={() => !column.disableSort && columnClick(column)}
|
onClick={() => !column.disableSort && columnClick(column)}
|
||||||
sx={{ cursor: column.disableSort ? "default" : "pointer" }}
|
sx={{ cursor: column.disableSort ? "default" : "pointer" }}
|
||||||
>
|
>
|
||||||
<Grid2 container spacing={1}>
|
<Grid2 container spacing={1} alignItems={"center"}>
|
||||||
{column.title} {showOrderIcon(column)}
|
{column.title} {showOrderIcon(column)}
|
||||||
</Grid2>
|
</Grid2>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue