mirror of
https://github.com/zadam/trilium.git
synced 2025-12-12 18:34:24 +01:00
feat(widgets): prevent clicks in toggle from dismissing menu
This commit is contained in:
parent
8fa9c25f2a
commit
b39a6bcc97
@ -139,8 +139,12 @@ export function FormListToggleableItem({ title, currentValue, onChange, ...props
|
||||
onChange(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>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user