Skip to content
Source
Sign inSign up
TanStack/router

Routes with lazy and those with loader async do not set view to elementet id after refresh #2174

Send to my agent
Closedjakubgryzinski(GitHub profile, opens in a new tab) opened this issue 2 comments

Describe the bug

Routes with lazy and those with loader async do not set view to elementet id after refresh. When it is on the path to a specific element with id

files .lazy, loader: async () => {},

Your Example Website or App

https://stackblitz.com/edit/vitejs-vite-rz7exv

Steps to Reproduce the Bug or Issue

  1. Go to Form (lazy) or Post (async loader)
  2. Click on Test link which leads to an element with id
  3. Refresh the site (The side inside the sandbox, not the entire sandbox)

Expected behavior

I would expect the viewer's view to be set on the element the link points to as it is on paths without lazy

Screenshots or Videos

https://github.com/user-attachments/assets/38969708-9927-4872-83ca-1141fd71975b

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari]
  • Version: [e.g. 91.1]

Additional context

No response

  1. seems to be a duplicate of https://github.com/TanStack/router/issues/2014, but #2014 does not mention the loader issue

  2. SeanCassiere added labelsbug

  3. SeanCassiere closed this

Sign in to join this conversation.