router icon indicating copy to clipboard operation
router copied to clipboard

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

Open JayCodeGitHub opened this issue 1 year ago • 1 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

JayCodeGitHub avatar Aug 23 '24 09:08 JayCodeGitHub

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

schiller-manuel avatar Aug 27 '24 20:08 schiller-manuel

Completed with https://github.com/TanStack/router/releases/tag/v1.98.1.

SeanCassiere avatar Jan 31 '25 02:01 SeanCassiere