Skip to content

Build your personal knowledge base with Trilium Notes

feat(widgets): toggle from label

Elian Dorane0f7d65f7744
diff --git a/apps/client/src/widgets/react/FormList.tsx b/apps/client/src/widgets/react/FormList.tsx
index 95a1052621..92c021c559 100644
--- a/apps/client/src/widgets/react/FormList.tsx
+++ b/apps/client/src/widgets/react/FormList.tsx
@@ -139,7 +139,10 @@ export function FormListToggleableItem({ title, currentValue, onChange, ...props
onChange(newValue: boolean): void;
}) {
return (
- <FormListItem {...props} onClick={(e) => e.stopPropagation()}>
+ <FormListItem {...props} onClick={(e) => {
+ e.stopPropagation();
+ onChange(!currentValue);
+ }}>
<FormToggle
switchOnName={title} switchOffName={title}
currentValue={currentValue}