Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

160
Visualizações
How to give a custom Value for MUI Switch when it is false

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> 
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda