fix(inertia): always rendering a anchor tag
๐ Linked issue
Try to fix button #3974
โ Type of change
- [ ] ๐ Documentation (updates to the documentation or readme)
- [x] ๐ Bug fix (a non-breaking change that fixes an issue)
- [ ] ๐ Enhancement (improving an existing functionality)
- [ ] โจ New feature (a non-breaking change that adds functionality)
- [ ] ๐งน Chore (updates to the build process or auxiliary tools and libraries)
- [ ] โ ๏ธ Breaking change (fix or feature that would cause existing functionality to change)
๐ Description
This is a attempt to fix the issue in #3974. This is my first contribution to open-source, let me know if something is wrong.
๐ Checklist
- [x] I have linked an issue or discussion.
- [ ] I have updated the documentation accordingly.
Why not keep the same v-if / v-else structure? ๐ค This makes it difficult to review.
Because the InertiaLink must only be used when the url is defined.
I think that, the issue arises because the InertiaLink component is rendered even when the url is null. In such cases, it attempts to navigate, potentially leading to unexpected behavior like linking to the current page or triggering navigation events.
@benjamincanac does this PR address the onSelect InertiaLink issue? I changed the Link.vue file for testing and still onSelect within a dropdown menu does not trigger
Did you use the latest pkg.pr.new package? This hasn't been released yet.
Did you use the latest
pkg.pr.newpackage? This hasn't been released yet.
Yes, i have the newest pkg.pr.new. The onSelect issue seems to persist.
It does indeed, @romhml any idea about this?
@benjamincanac I want to think @Mallon94 is using nuxt/ui-pro because in nuxt/ui https://pkg.pr.new/@nuxt/ui@999a0f8 it is already fixed
@FabianMHz15 I am using nuxt/ui-pro however it directly depends on nuxt/ui so I am able to override which version it uses and I've tested out these newer patches and the issue still persists.
Yes I've reproduced the issue as well using @nuxt/ui-pro and with a @nuxt/ui resolution to the latest pkg.pr.new.
+1