Skip to content

Commit 2b72804

Browse files
committed
Merge branch 'lebihae/1228' into 'main'
fix(permissions): make documents access toggle actually trigger the mutation (fixes #1228) Closes #1228 See merge request churros/churros!276
2 parents 5f47a42 + 11d9947 commit 2b72804

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.changeset/bright-rocks-matter.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@churros/app': patch
3+
---
4+
5+
fix(permissions): make documents access toggle actually trigger the mutation (fixes #1228)

packages/app/src/routes/(app)/users/[uid]/edit/permissions/+page.svelte

+2-3
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,10 @@
6868
<InputToggle
6969
slot="right"
7070
value={loading(user.canAccessDocuments, false)}
71-
on:change={async ({ currentTarget }) => {
72-
if (!(currentTarget instanceof HTMLInputElement)) return;
71+
on:update={async ({ detail }) => {
7372
await mutateAndToast(SetCanAccessDocuments, {
7473
uid: $page.params.uid,
75-
enabled: currentTarget.checked,
74+
enabled: detail,
7675
});
7776
}}
7877
></InputToggle>

0 commit comments

Comments
 (0)