feat(widgets): prevent clicks in toggle from dismissing menu

This commit is contained in:
Elian Doran 2025-12-10 18:17:39 +02:00
parent 8fa9c25f2a
commit b39a6bcc97
No known key found for this signature in database

View File

@ -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>
);
}