I'm using MUI Switch for an On-Off Button. I manually gave the value as "on" and it is working well when switch is true("Im getting output value as "on", but there is no option for changing the default value "false" when the switch is in false state. Is there any way to do that? Code:-
<FormControl>
<FormControlLabel
value="on"
control={<Switch name="status" color="primary"/>}
{...register("status")}
label={watch('status') ? "On" : "Off"}
/>
</FormControl>