mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-25 02:32:55 +02:00
fix settings unfocusing on every key stroke
This commit is contained in:
@@ -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 />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user