Browse Source

fix desynced input field. causing mobile usage issues

pull/70/head
Jelle van Snik 3 years ago
parent
commit
f7ad9b67fa
  1. 1
      .gitignore
  2. 1
      src/hooks/useSearchQuery.ts

1
.gitignore vendored

@ -17,6 +17,7 @@ node_modules
.env.development.local .env.development.local
.env.test.local .env.test.local
.env.production.local .env.production.local
.env
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*

1
src/hooks/useSearchQuery.ts

@ -13,6 +13,7 @@ export function useSearchQuery(): [MWQuery, (inp: Partial<MWQuery>) => void] {
const updateParams = (inp: Partial<MWQuery>) => { const updateParams = (inp: Partial<MWQuery>) => {
const copySearch: MWQuery = { ...search }; const copySearch: MWQuery = { ...search };
Object.assign(copySearch, inp); Object.assign(copySearch, inp);
setSearch(copySearch);
history.replace( history.replace(
generatePath(path, { generatePath(path, {
query: query:

Loading…
Cancel
Save