TanStackT
TanStack2y ago
8 replies
broad-emerald

routeTree.gen.ts setting the wrong parent

hey guys.
I have a file route defined as
# in: src/routes/~tree/~$treeId/~test/~$testId/~index.tsx

export const Route = createFileRoute('/tree/$treeId/test/$testId/')({
  component: () => <TestDetails />,
});


and i was expecting /tree/$treeId as a parent but in the routeTree.gen.ts i only have the rootRoute as parent
const TreeTreeIdTestTestIdIndexRoute = TreeTreeIdTestTestIdIndexImport.update({
  path: '/tree/$treeId/test/$testId/',
  getParentRoute: () => rootRoute,
} as any)

my goal is to inherit the search params from /tree/$treeId
Was this page helpful?