mirror of
https://github.com/pockethost/pockethost.git
synced 2025-03-30 15:08:30 +00:00
fix: miniToggle call save on action
This commit is contained in:
parent
09e33458c2
commit
1f41a9fbf2
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user