Skip to content

Commit

Permalink
fix: Pass transition options to useQueryStates
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 committed Feb 8, 2022
1 parent aa5464a commit 05e06b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/useQueryStates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export function useQueryStates<KeyMap extends UseQueryStatesKeysMap>(
)

const update = React.useCallback<SetValues<KeyMap>>(
stateUpdater => {
(stateUpdater, transitionOptions) => {
const isUpdaterFunction = (input: any): input is UpdaterFn<KeyMap> => {
return typeof input === 'function'
}
Expand Down Expand Up @@ -140,7 +140,8 @@ export function useQueryStates<KeyMap extends UseQueryStatesKeysMap>(
pathname: window.location.pathname,
hash,
search
}
},
transitionOptions
)
},
[keys, updateUrl]
Expand Down

0 comments on commit 05e06b8

Please sign in to comment.