diff --git a/optuna_dashboard/ts/components/DataGrid.tsx b/optuna_dashboard/ts/components/DataGrid.tsx index d19ec9d9..24e45dc7 100644 --- a/optuna_dashboard/ts/components/DataGrid.tsx +++ b/optuna_dashboard/ts/components/DataGrid.tsx @@ -359,7 +359,9 @@ function stableSort( stabilizedThis.sort((a, b) => { if (less) { const ascending = order == "asc" - const result = ascending ? -less(a[0], b[0], ascending) : less(a[0], b[0], ascending) + const result = ascending + ? -less(a[0], b[0], ascending) + : less(a[0], b[0], ascending) if (result !== 0) return result } else { const result = comparator(a[0], b[0]) diff --git a/standalone_app/src/components/DataGrid.tsx b/standalone_app/src/components/DataGrid.tsx index d19ec9d9..24e45dc7 100644 --- a/standalone_app/src/components/DataGrid.tsx +++ b/standalone_app/src/components/DataGrid.tsx @@ -359,7 +359,9 @@ function stableSort( stabilizedThis.sort((a, b) => { if (less) { const ascending = order == "asc" - const result = ascending ? -less(a[0], b[0], ascending) : less(a[0], b[0], ascending) + const result = ascending + ? -less(a[0], b[0], ascending) + : less(a[0], b[0], ascending) if (result !== 0) return result } else { const result = comparator(a[0], b[0]) diff --git a/standalone_app/src/components/TrialTable.tsx b/standalone_app/src/components/TrialTable.tsx index 5a0efc96..97a04f3c 100644 --- a/standalone_app/src/components/TrialTable.tsx +++ b/standalone_app/src/components/TrialTable.tsx @@ -65,7 +65,7 @@ export const TrialTable: FC<{ return 0 } if (firstVal === undefined) { - return ascending ? -1 : 1 + return ascending ? -1 : 1 } else if (secondVal === undefined) { return ascending ? 1 : -1 }