fix: miniToggle call save on action

This commit is contained in:
Ben Allfree 2023-06-19 05:12:31 -07:00
parent 09e33458c2
commit 1f41a9fbf2

View File

@ -7,7 +7,7 @@
const id = uniqueId()
let msg = ''
$: {
const onChange = () => {
save(value)
.then((res) => {
msg = res
@ -19,6 +19,13 @@
</script>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" {id} bind:checked={value} />
<input
class="form-check-input"
type="checkbox"
role="switch"
{id}
bind:checked={value}
on:change={onChange}
/>
<label class="form-check-label" for={id}><slot /></label>
</div>