Replies: 2 comments
|
Seems it work when I dynamically change values from within application but when I reload the page the params persist. This also seems to happen on the homepage of nuqs. https://nuqs.47ng.com/?count=okok // <--- I would expect this param to be automatically removed as its not valid Is validation only achievable via useEffect or something ? Where i need to manually check params and set manually if not valid ? |
|
Here's how it works:
One of the issues is that we don't have a way to know the reason why a state is null/default (is it not present in the URL vs is it invalid). This is something we might address when adding support for validation with Zod / Valibot / ArkType / Standard Schema. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi, I would like to have a custom filter parser where it only accepts allowed values to be present otherwise the param should be removed or cleared out from the invalid value. But I have a problem with handling the invalid value still persisting in in the url despite it being invalid. This probably doesnt clear the value from url because of eq check if im not mistaken. But how I can debug the eq function? It doesnt seem to fire like the serialize or parse where I can check the values.
Anyway here is what I have for now
So I want url to only have ?type=filterA,filterB as param values if anything else it should clear completely the param from url or only the invalid value. How do i do that
All reactions