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()
|
const id = uniqueId()
|
||||||
let msg = ''
|
let msg = ''
|
||||||
|
|
||||||
$: {
|
const onChange = () => {
|
||||||
save(value)
|
save(value)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
msg = res
|
msg = res
|
||||||
@ -19,6 +19,13 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="form-check form-switch">
|
<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>
|
<label class="form-check-label" for={id}><slot /></label>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user