Skip to content

How to type an object as being Values that can be passed in to a serializer or set state action? #653

Answered by franky47
neefrehman asked this question in Q&A
Discussion options

You must be logged in to vote

For the clearing part, you should be able to call setPaginationState(null, { /* options here */ }). This will clear all search params that were declared to the useQueryStates hook, without having to enumerate them (available since 1.19.1).

That being said, the serializer doesn't have this behaviour, but it could be something nice to add. Would you like to open a PR?

Something else that might be of use is the inferParserType utility.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@neefrehman
Comment options

Answer selected by franky47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants