Skip to content

Commit

Permalink
fix ButtonLink doing full page navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
swantzter committed Jul 10, 2023
1 parent 1417aa2 commit cf54608
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ dist-ssr
.vscode
storybook-static
*.log
*.tgz
2 changes: 1 addition & 1 deletion lib/components/ButtonLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defineProps({

<template>
<router-link :to="to" v-slot="{ href, navigate, isActive }" v-bind="$props" custom>
<a :href="href" @click="disabled ? null : navigate()">
<a :href="href" @click.prevent="disabled ? null : navigate()">
<text-button :dense="dense" :selected="selected" :disabled="disabled">
<slot :is-active="isActive" />
</text-button>
Expand Down

0 comments on commit cf54608

Please sign in to comment.