We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b380b30 commit e444ca1Copy full SHA for e444ca1
components/vc-switch/Switch.jsx
@@ -42,14 +42,14 @@ export default {
42
});
43
},
44
methods: {
45
- setChecked(checked) {
+ setChecked(checked, e) {
46
if (this.disabled) {
47
return;
48
}
49
if (!hasProp(this, 'checked')) {
50
this.stateChecked = checked;
51
52
- this.$emit('change', checked);
+ this.$emit('change', checked, e);
53
54
handleClick(e) {
55
const checked = !this.stateChecked;
@@ -59,10 +59,10 @@ export default {
59
handleKeyDown(e) {
60
if (e.keyCode === 37) {
61
// Left
62
- this.setChecked(false);
+ this.setChecked(false, e);
63
} else if (e.keyCode === 39) {
64
// Right
65
- this.setChecked(true);
+ this.setChecked(true, e);
66
67
68
handleMouseUp(e) {
0 commit comments