Global search param
Starting from the auth layout there is a search param (gameServerId) that needs to be set for every route within that layout . However when navigating I currently need to set that search param again for every navigation... Is there a way to maintain that global search param? I thought I could achieve this through the validateSearch from the _auth, but that does not allow me to set custom search
5 Replies
like-gold•2y ago
Whenever you navigate you would have to use a callback ->
navigate({ search: prev => ({ ...prev }); to retain the current search paramssecure-lavenderOP•2y ago
thx
robust-apricot•2y ago
This will also work
navigate({ search: true});secure-lavenderOP•2y ago
that's not too bad, is there something similar for Link as well?
absent-sapphire•2y ago
navigate and Link share the same API