Skip to content

Commit

Permalink
[button] add disabled attribute fixes #268
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooya Parsa committed Apr 22, 2017
1 parent 3f32bce commit 92f4f11
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/components/button.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<template>
<button :class="classObject" :is="componentType" :to="to" :href="href" @click="onclick">
<button :class="classObject"
:is="componentType"
:to="to"
:href="href"
@click="onclick"
:disabled="disabled"
>
<slot></slot>
</button>
</template>
Expand Down

2 comments on commit 92f4f11

@ssc-hrep3
Copy link

Choose a reason for hiding this comment

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

Great, thanks! 👍

@tmorehouse
Copy link
Member

Choose a reason for hiding this comment

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

When the button is converted to a link (based on componentType), should the click handler do a preventDefault() to handle "disabled" links?

Please sign in to comment.