Skip to content

Commit

Permalink
fix: handle toggle switch component emits
Browse files Browse the repository at this point in the history
  • Loading branch information
alfsouza708 committed Feb 2, 2022
1 parent a205c08 commit 95b8634
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/components/ToggleSwitch/ToggleSwitch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,7 @@ export default {
},
beforeMount() {
this.value = this.checked;
},
mounted() {
this.$emit('input', this.value);
if (this.checked) this.value = this.checked;
},
};
</script>
Expand Down

0 comments on commit 95b8634

Please sign in to comment.