From 66b6fcea43a9ffdf728f0c9e27fddd702be19f19 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Sun, 16 Dec 2018 23:57:15 +0300 Subject: [PATCH] Check for disabled --- src/components/togglebutton/ToggleButton.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/togglebutton/ToggleButton.vue b/src/components/togglebutton/ToggleButton.vue index a88bfde2c..214e733d9 100644 --- a/src/components/togglebutton/ToggleButton.vue +++ b/src/components/togglebutton/ToggleButton.vue @@ -32,10 +32,12 @@ export default { }, methods: { onClick(event) { - this.$emit('click', event); - this.$emit('input', !this.value); - this.$emit('change', event); - this.$refs.input.focus(); + if (!this.disabled) { + this.$emit('click', event); + this.$emit('input', !this.value); + this.$emit('change', event); + this.$refs.input.focus(); + } }, onFocus(event) { this.focused = true;