Skip to content

Commit

Permalink
fix: Fix button click event not emitting
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisGV04 committed Sep 16, 2023
1 parent db45a87 commit 51fbc3e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/runtime/components/elements/Link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ export default defineComponent<Props>({
inactiveClass: { type: String, default: undefined },
},

emits: ["click"],

// We extract the "custom" prop to avoid overrides
// eslint-disable-next-line @typescript-eslint/no-unused-vars
setup({ custom, ...props }, ctx) {
Expand Down Expand Up @@ -114,6 +112,7 @@ export default defineComponent<Props>({
role: props.disabled ? undefined : "link",
onClick: (e: Event) => {
!isExternal && navigate(e);
// eslint-disable-next-line vue/require-explicit-emits
ctx.emit("click", e);
},
ariaDisabled: props.disabled ? "true" : undefined,
Expand Down

0 comments on commit 51fbc3e

Please sign in to comment.