Skip to content

Build your personal knowledge base with Trilium Notes

fix(standalone/setup): clicking on advanced options submits form

Elian Doran4dcb08745b35
diff --git a/apps/client/src/widgets/react/Collapsible.tsx b/apps/client/src/widgets/react/Collapsible.tsx
index cdbd0dcac5..38d2e4caf0 100644
--- a/apps/client/src/widgets/react/Collapsible.tsx
+++ b/apps/client/src/widgets/react/Collapsible.tsx
@@ -43,13 +43,13 @@ export function ExternallyControlledCollapsible({ title, children, className, ex
setFullyExpanded(true);
}, 250);
return () => clearTimeout(timeout);
- } else {
- setFullyExpanded(true);
- }
+ }
+ setFullyExpanded(true);
+
} else {
setFullyExpanded(false);
}
- }, [expanded, transitionEnabled])
+ }, [expanded, transitionEnabled]);
return (
<div className={clsx("collapsible", className, {
@@ -58,7 +58,10 @@ export function ExternallyControlledCollapsible({ title, children, className, ex
})}>
<button
className="collapsible-title tn-low-profile"
- onClick={() => setExpanded(!expanded)}
+ onClick={(e) => {
+ e.preventDefault();
+ setExpanded(!expanded);
+ }}
aria-expanded={expanded}
aria-controls={contentId}
>