Hello I would like to know how I can navigate from a route to different one keeping the id.
For example I have a list with items and when I select an item and I would like to go from:
route1/{id1}
route1/{id2}
but the route it's on sidebar navigation and and will be on all the routes
the code below it's working but I've got type errors. How I can solve this issue?
navigate({
params: { farmId },
search: router.location.search,
})```
```tsx
Object literal may only specify known properties, and 'farmId' does not exist in type 'ParamsReducerFn<RouterCore<Route<Register, any, "/", "/", string, "__root__", undefined, {}, {}, AnyContext, AnyContext, {}, undefined, RootRouteChildren, FileRouteTypes, unknown, unknown, undefined>, "never", false, RouterHistory, Record<...>>, "PATH", string, string | undefined>'.```
```tsx
Type '{ search?: string | undefined; status?: string | undefined; countryCode?: string | null | undefined; latitude?: number | null | undefined; longitude?: number | null | undefined; sbi?: number | ... 1 more ... | undefined; parcelId?: string | undefined; species?: string | undefined; }' is not assignable to type 'true | ParamsReducerFn<RouterCore<Route<Register, any, "/", "/", string, "__root__", undefined, {}, {}, AnyContext, AnyContext, {}, undefined, RootRouteChildren, FileRouteTypes, unknown, unknown, undefined>, "never", false, RouterHistory, Record<...>>, "SEARCH", string, string | undefined> | undefined'.```