Relative Navigation with Search Params
I have a parent layout route with this schema:
These filters are configured through a dialog that is triggered from my "chat inbox" that is visible on both
Inside of my
My first instict was to do something like this:
using
The simplest fix I found was to remove that
Am I missing something with this issue or is there a simple way to get around what I'm looking to do?
These filters are configured through a dialog that is triggered from my "chat inbox" that is visible on both
/$tenantId and /$tenantId/$userIdInside of my
FilterDialog popup I want to manipulate those search params, which I was doing through useNavigateMy first instict was to do something like this:
using
to as a relative path meaning "current route but with these updated parameters". However it seems like . in this case is linked to that from property of useNavigate, so if I'm on /$tenantId/$userIdit navigates me back to /$tenantId, dropping the selected user and losing UI state.The simplest fix I found was to remove that
from property inside of useNavigate. That's not the worst thing in the world, but I do lose a lot of the strong type guarantees I had before. Am I missing something with this issue or is there a simple way to get around what I'm looking to do?