Default value using useQueryStates #823
Answered
by
franky47
Emiliano-Bucci
asked this question in
General
-
Hi! I'm using useQueryStates to simplify logic of usage of many and multiple filters, and most of them are list of ids, i.e. towns=1,2,3,4,5 The problem is that when I call setFilters({ towns: [] }) even if I've setted clearOnDefault=true the query param is not removed from url, remaining ?towns= Is there a way to prevent this? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
franky47
Dec 22, 2024
Replies: 1 comment 1 reply
-
Can you show me your hook declaration please? You could be missing a .withDefault([]) on the parseAsArrayOf. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Emiliano-Bucci
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you show me your hook declaration please?
You could be missing a .withDefault([]) on the parseAsArrayOf.