Skip to content

Commit

Permalink
Tidy up page behaviour on form change
Browse files Browse the repository at this point in the history
  • Loading branch information
Willdotwhite committed Aug 10, 2024
1 parent 83a59fa commit 3033d09
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/src/pages/home/components/SearchFormWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export const SearchFormWrapper: React.FC<{
delete formattedValues.timezoneEnd
}

// When the form changes, reset the pagination back to page=1
// Otherwise adding filtering leaves you on page=lots with no posts to view
formattedValues.page = "1"

// @ts-ignore
setSearchParams(formattedValues)
}
Expand Down

0 comments on commit 3033d09

Please sign in to comment.