fix: broken checkbox behavior (#4509)

Signed-off-by: Eduard Aksamitov <e@euaaaio.ru>
This commit is contained in:
Eduard Aksamitov 2024-02-04 21:29:51 +03:00 committed by GitHub
parent a036f24856
commit 26306ddfa1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,7 +24,7 @@
const dispatch = createEventDispatcher()
let oldChecked = checked
$: oldChecked = checked
const handleValueChanged = (event: Event): void => {
if (readonly) {
@ -52,7 +52,7 @@
class:checked
on:click|stopPropagation
>
<input class="chBox" disabled={readonly} type="checkbox" bind:checked on:change={handleValueChanged} />
<input class="chBox" disabled={readonly} type="checkbox" bind:checked on:change|capture={handleValueChanged} />
<svg class="checkSVG" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
{#if checked}
{#if symbol === 'minus'}