feat(widgets): toggle from label

This commit is contained in:
Elian Doran 2025-12-10 18:24:31 +02:00
parent f18ac3a923
commit e0f7d65f77
No known key found for this signature in database

View File

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