From 9b968e5edc6c4996d00477fb3fb3c580f650ca63 Mon Sep 17 00:00:00 2001 From: portikM Date: Thu, 21 Nov 2024 13:31:39 -0500 Subject: [PATCH] fix(kinputswitch): fix events race condition --- 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) } }