Skip to content

fix(vue): pass router-link value to href to properly render clickable elements#29745

Merged
brandyscarney merged 6 commits intomainfrom
ROU-10977
Aug 5, 2024
Merged

fix(vue): pass router-link value to href to properly render clickable elements#29745
brandyscarney merged 6 commits intomainfrom
ROU-10977

Conversation

@brandyscarney
Copy link
Copy Markdown
Member

@brandyscarney brandyscarney commented Aug 1, 2024

Issue number: N/A


What is the current behavior?

Ionic Framework Vue components using router-link do not apply an href property which causes components to render div or button elements when they should render an a. This is inconsistent with the way Angular and Vue handle router link.

What is the new behavior?

Updates @stencil/vue-output-target to latest which adds the code from the following PR: stenciljs/output-targets#446

The update in vue output target checks if router-link and navManager are defined so this fix only applies to Ionic Framework components. If both are defined then it adds the href property to the element with the value of router-link.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Dev build: 8.2.7-dev.11722629362.1ac136c4

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 2, 2024 8:06pm

@brandyscarney brandyscarney marked this pull request as ready for review August 2, 2024 20:31
@brandyscarney brandyscarney requested a review from a team as a code owner August 2, 2024 20:31
@brandyscarney brandyscarney requested a review from gnbm August 2, 2024 20:31
Comment thread packages/vue/src/vue-component-lib/utils.ts
Copy link
Copy Markdown
Contributor

@thetaPC thetaPC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package package: vue @ionic/vue package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants