Closed DogPawHat closed 2 weeks ago
I think were golden, the fix has been added.
It's 4.30am here. I'll check this out later and run some tests in the examples.
please update the title of this PR since now this not only adds tests but also fixes a abug
CI is running/has finished running commands for commit 4502848359ae6c188db38a8cbb13017baff6b542. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this CI Pipeline Execution
Sent with 💌 from NxCloud.
Tested this locally and can confirm it works.
After this release, I'm getting an error when changing the search of a route:
navigate({
search: { tab: newTab },
});
I have a screen with multiple tabs that are controlled by the search param tab
. The first render (navigation) works well /area-reservada/minhas-credenciacoes/credenciacoes/d0efbc00-7ac7-4869-b3af-f6115a9b52ef?tab=estado-pedido
, but when I change tabs, it throws an error:
{
"status": "resolved",
"routerCode": "BEFORE_LOAD"
}
@DogPawHat @SeanCassiere any advice? Is there any way of using the current state of the route (params) if the to
and from
are not specified? Because if I specify the to
it works as pretended.
@ruiaraujo012 please reference this PR and create an issue with a reproduction. I'll check it out over the weekend.
Ok, thanks, I'll do it tomorrow.
I'm unable to replicate it, I have a complex UI with multiple tabs. Maybe the problem is mine, but it only appears after I update the package, if I roll back it works again. If I put the to prop it works as well.
If I have more time, I'll try to replicate it again closer to what I have on my codebase.
Forget what I said, If I use a layout, it causes the error, I'll open an issue with the reproduction.
Add fixes and tests for
router.navigate
when using theparams: (prevParams) => newParams
option (with no extrato
orfrom
option).Thanks to @SeanCassiere for the suggestion to patch
router.ts
Fixes #1525 Should also fix https://github.com/TanStack/tanstack.com/issues/218