Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(widgets): prevent clicks in toggle from dismissing menu
Elian Doranb39a6bcc97cf
diff --git a/apps/client/src/widgets/react/FormList.tsx b/apps/client/src/widgets/react/FormList.tsxindex 3f81472414..95a1052621 100644--- a/apps/client/src/widgets/react/FormList.tsx+++ b/apps/client/src/widgets/react/FormList.tsx@@ -139,8 +139,12 @@ export function FormListToggleableItem({ title, currentValue, onChange, ...propsonChange(newValue: boolean): void;}) {return (- <FormListItem {...props}>- <FormToggle switchOnName={title} switchOffName={title} currentValue={currentValue} onChange={onChange} />+ <FormListItem {...props} onClick={(e) => e.stopPropagation()}>+ <FormToggle+ switchOnName={title} switchOffName={title}+ currentValue={currentValue}+ onChange={onChange}+ /></FormListItem>);}