From 6e3626f949df0bc0a11ffd6cd0dcc4dafa9f8a1b Mon Sep 17 00:00:00 2001 From: Maksym Portianoi Date: Thu, 21 Nov 2024 13:40:21 -0500 Subject: [PATCH] fix(kinputswitch): fix events race condition (#2523) --- src/components/KInputSwitch/KInputSwitch.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/KInputSwitch/KInputSwitch.vue b/src/components/KInputSwitch/KInputSwitch.vue index 5c30c00341..084f5aa621 100644 --- a/src/components/KInputSwitch/KInputSwitch.vue +++ b/src/components/KInputSwitch/KInputSwitch.vue @@ -133,9 +133,9 @@ const propagateInputEvent = (event: Event): void => { const handleChange = (event: Event): void => { if (props.modelValue !== (event.target as HTMLInputElement).checked) { + emit('update:modelValue', (event.target as HTMLInputElement).checked) emit('change', (event.target as HTMLInputElement).checked) emit('input', (event.target as HTMLInputElement).checked) - emit('update:modelValue', (event.target as HTMLInputElement).checked) } }