Skip to content

Commit

Permalink
Make popover hide when 'disable' is set to true
Browse files Browse the repository at this point in the history
  • Loading branch information
GregPeden committed Apr 18, 2018
1 parent 618de05 commit f782285
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 3 deletions.
5 changes: 4 additions & 1 deletion dev/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ Vue.component('clickConfirm', ClickConfirm);</code></pre>
<th scope="row"><code>disabled</code></th>
<td>Boolean</td>
<td><code>false</code></td>
<td>Suppresses the click-confirm dialogue and allows the click event to proceed as normal.</td>
<td>
Suppresses the click-confirm dialogue and allows the click event to proceed as normal. If set to 'true'
while the Click Confirm popover it being displayed, the popover will be suppressed.
</td>
</tr>
<tr>
<th scope="row"><code>messages</code></th>
Expand Down
8 changes: 8 additions & 0 deletions dist/click-confirm.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ var component$1 = {render: function(){var _vm=this;var _h=_vm.$createElement;var
}
},

watch: {
disabled: function disabled(newValue) {
if (newValue && this.isOpen) {
this.onCancel();
}
}
},

methods: {
onHidden: function onHidden() {
this.target = null;
Expand Down
2 changes: 1 addition & 1 deletion dist/click-confirm.common.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions dist/click-confirm.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ var component$1 = {render: function(){var _vm=this;var _h=_vm.$createElement;var
}
},

watch: {
disabled: function disabled(newValue) {
if (newValue && this.isOpen) {
this.onCancel();
}
}
},

methods: {
onHidden: function onHidden() {
this.target = null;
Expand Down
8 changes: 8 additions & 0 deletions dist/click-confirm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4754,6 +4754,14 @@ var component$1 = {render: function(){var _vm=this;var _h=_vm.$createElement;var
}
},

watch: {
disabled: function disabled(newValue) {
if (newValue && this.isOpen) {
this.onCancel();
}
}
},

methods: {
onHidden: function onHidden() {
this.target = null;
Expand Down
2 changes: 1 addition & 1 deletion dist/click-confirm.min.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/components/ClickConfirm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@
}
},
watch: {
disabled(newValue) {
if (newValue && this.isOpen) {
this.onCancel();
}
}
},
methods: {
onHidden() {
this.target = null;
Expand Down

0 comments on commit f782285

Please sign in to comment.