Skip to content

Commit

Permalink
fix sort default order
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson committed May 21, 2024
1 parent 3b19450 commit d326f7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/src/components/SearchPage/SearchFullUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ export const InnerSearchFullUI = ({
const [state, setState] = useQueryAsState({});
const [page, setPage] = useState(1);

const orderByField = state.orderBy ?? schema.primaryKey;
const orderDirection = state.order ?? 'ascending';
const orderByField = state.orderBy ?? schema.defaultOrderBy ?? schema.primaryKey;
const orderDirection = state.order ?? schema.defaultOrder ?? 'ascending';

const setOrderByField = (field: string) => {
setState((prev: QueryState) => ({
Expand Down

0 comments on commit d326f7a

Please sign in to comment.