Skip to content

Commit

Permalink
Submit search form only when value changes
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed May 14, 2024
1 parent 380deaa commit 19baeda
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .changelog/1411.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix mobile search issues
2 changes: 1 addition & 1 deletion src/app/components/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const SearchCmp: FC<SearchProps> = ({ scope, variant, disabled, onFocusChange: o

const onFormSubmit = (e?: FormEvent) => {
e?.preventDefault()
if (value) {
if (value && value !== valueInSearchParams) {
navigate(RouteUtils.getSearchRoute(scope, valueWithoutPrefix))
}
}
Expand Down

0 comments on commit 19baeda

Please sign in to comment.