Skip to content

Commit

Permalink
UBERF-4610: Fix checkbox behaviour (#4173)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
  • Loading branch information
haiodo committed Jan 5, 2024
1 parent fa5884d commit 617e267
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/ui/src/components/CheckBox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,19 @@
const dispatch = createEventDispatcher()
let oldChecked = checked
const handleValueChanged = (event: Event) => {
if (readonly) {
return
}
const eventTarget = event.target as HTMLInputElement
const isChecked = eventTarget.checked
dispatch('value', isChecked)
if (oldChecked !== isChecked) {
oldChecked = isChecked
dispatch('value', isChecked)
}
}
</script>

Expand Down

0 comments on commit 617e267

Please sign in to comment.