ui icon indicating copy to clipboard operation
ui copied to clipboard

fix(inertia): always rendering a anchor tag

Open jvbianchi opened this issue 9 months ago โ€ข 1 comments

๐Ÿ”— 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.

jvbianchi avatar Apr 26 '25 00:04 jvbianchi

npm i https://pkg.pr.new/@nuxt/ui@3989

commit: 64e9c30

pkg-pr-new[bot] avatar Apr 26 '25 00:04 pkg-pr-new[bot]

Why not keep the same v-if / v-else structure? ๐Ÿค” This makes it difficult to review.

benjamincanac avatar Apr 30 '25 13:04 benjamincanac

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.

jvbianchi avatar Apr 30 '25 13:04 jvbianchi

@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

Mallon94 avatar May 07 '25 11:05 Mallon94

Did you use the latest pkg.pr.new package? This hasn't been released yet.

benjamincanac avatar May 07 '25 11:05 benjamincanac

Did you use the latest pkg.pr.new package? This hasn't been released yet.

Yes, i have the newest pkg.pr.new. The onSelect issue seems to persist.

Mallon94 avatar May 07 '25 12:05 Mallon94

It does indeed, @romhml any idea about this?

benjamincanac avatar May 07 '25 13:05 benjamincanac

@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 avatar May 07 '25 21:05 FabianMHz15

@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.

Mallon94 avatar May 08 '25 07:05 Mallon94

Yes I've reproduced the issue as well using @nuxt/ui-pro and with a @nuxt/ui resolution to the latest pkg.pr.new.

benjamincanac avatar May 08 '25 12:05 benjamincanac

+1

fusigabs avatar May 08 '25 20:05 fusigabs