fix settings unfocusing on every key stroke

This commit is contained in:
Olivier Gagnon
2022-08-29 16:36:08 -04:00
parent fb372bef54
commit 3fe6a6e19d
6 changed files with 18 additions and 25 deletions
+11 -8
View File
@@ -18,13 +18,16 @@ export function OptionSwitch({ checked, onChange, text, tooltip }: IProps): Reac
useEffect(() => onChange(value), [value]);
return (
<FormControlLabel
control={<Switch checked={value} onChange={handleSwitchChange} />}
label={
<Tooltip title={<Typography>{tooltip}</Typography>}>
<Typography>{text}</Typography>
</Tooltip>
}
/>
<>
<FormControlLabel
control={<Switch checked={value} onChange={handleSwitchChange} />}
label={
<Tooltip title={<Typography>{tooltip}</Typography>}>
<Typography>{text}</Typography>
</Tooltip>
}
/>
<br />
</>
);
}