Skip to content

Commit

Permalink
JobList, RunList: Fix regressed table sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
zmc committed May 11, 2023
1 parent a0974fc commit 8bcfe44
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
14 changes: 9 additions & 5 deletions src/components/JobList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,16 @@ export default function JobList({ query, state }) {
rows={query.data?.jobs || []}
pageSize={25}
loading={query.isLoading || query.isFetching}
sortModel={[
{
field: "job_id",
sort: "asc",
initialState={{
sorting: {
sortModel: [
{
field: "job_id",
sort: "asc",
},
],
},
]}
}}
filterModel={filterModel}
getRowId={(row) => row.job_id}
getRowClassName={(params) => {
Expand Down
14 changes: 9 additions & 5 deletions src/components/RunList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,16 @@ export default function RunList(props) {
columns={columns}
rows={query.data || []}
loading={query.isLoading || query.isFetching}
sortModel={[
{
field: "scheduled",
sort: "desc",
initialState={{
sorting: {
sortModel: [
{
field: "scheduled",
sort: "desc",
},
],
},
]}
}}
getRowId={(row) => row.name}
getRowClassName={(params) => {
const status = params.row.status.split(" ").pop();
Expand Down

0 comments on commit 8bcfe44

Please sign in to comment.