Skip to content

Conversation

@pascalbaljet
Copy link
Member

Fixes #1746. Supports custom components instead of just HTML tags:

<Link as={CustomButton} method="post" href="/user" data={{ test: 'data' }}>
    Custom Component with Data
</Link>

Replaces PR #2264 and #1940 (will add you as a co-author). I've opened a new PR as this builds upon PR #2441 and I don't think Inertia should alter DOM elements. It now always passes the href attribute to custom components and it's up to the user to handle this (or not).

@pascalbaljet pascalbaljet marked this pull request as ready for review July 17, 2025 12:02
@pascalbaljet pascalbaljet merged commit d7a1897 into master Jul 29, 2025
6 checks passed
@pascalbaljet pascalbaljet deleted the link-as branch July 29, 2025 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Link component as doesn't render other components

2 participants