diff --git a/frontend/src/components/sidebar.tsx b/frontend/src/components/sidebar.tsx
index 5d5b6ce..a651fd0 100644
--- a/frontend/src/components/sidebar.tsx
+++ b/frontend/src/components/sidebar.tsx
@@ -39,7 +39,7 @@ export default function Sidebar(props : SidebarProps) {
variant='standard'
sx={{width: '100%'}}
value={props.filters.namePart}
- onChange={e => props.onChange(Object.assign({}, {...props.filters}, {namePart: (e.target as any).value}))}
+ onChange={e => props.onChange(Object.assign({}, {...props.filters}, {namePart: (e.target as any).value, currentPage: 1}))}
/>
@@ -47,7 +47,7 @@ export default function Sidebar(props : SidebarProps) {
Search by Firm Name Only
props.onChange(Object.assign({}, {...props.filters}, {nameOnly: value}))}
+ onChange={(_, value) => props.onChange(Object.assign({}, {...props.filters}, {nameOnly: value, currentPage: 1}))}
/>
@@ -60,7 +60,7 @@ export default function Sidebar(props : SidebarProps) {
options={cities}
value={props.filters.cities}
getOptionLabel={capitaliseFirstLetter}
- onChange={(_, value) => props.onChange(Object.assign({}, {...props.filters}, {cities: value}))}
+ onChange={(_, value) => props.onChange(Object.assign({}, {...props.filters}, {cities: value, currentPage: 1}))}
renderInput={(params) => (
props.onChange(Object.assign({}, {...props.filters}, {minRating: value}))}
+ onChange={(_, value) => props.onChange(Object.assign({}, {...props.filters}, {minRating: value, currentPage: 1}))}
/>
@@ -89,7 +89,7 @@ export default function Sidebar(props : SidebarProps) {