router
router copied to clipboard
The target prop is not passed to external links
Describe the bug
Adding a prop target="_blank" on an external link (= full URL) is not supported. The only prop passed is href.
Your Example Website or App
https://github.com/TanStack/router/compare/main...arthurflachs:router:fix/target-blank-external
Steps to Reproduce the Bug or Issue
- Run the basic example and add an external link with
target="_blank" - The attribute is not passed to the rendered link
Expected behavior
The attribute should be passed to the HTML link, and open in a new window/tab.
Screenshots or Videos
No response
Platform
Any platform
- Version: latest (1.4.6)
Additional context
https://github.com/TanStack/router/compare/main...arthurflachs:router:fix/target-blank-external
This fixes the bug, however I feel this is too minimal : other props might need to be passed.