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

143
Visualizações
react hook form with Slider and Input

I need to get same value from Slider when I move it and from Input when I enter new value but it doesnt work correct

                            <StyledSlider
                            {register(NAMES.AMOUNT)}
                            defaultValue={5000}
                            value={typeof value === 'number' ? value : 5000}
                            min={5000}
                            max={50000}
                            onChange={handleSliderChange(NAMES.AMOUNT)}
                        />
                        <StyledLabel>
                            <StyledInput
                            {register(NAMES.AMOUNT)}
                                value={value}
                                onChange={handleInputChange(NAMES.AMOUNT)}
                                onBlur={handleBlur}
                                disableUnderline={true}
                            />
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The range input's value type is a string, and you have set up a type check with a fallback for 5000.

If the state handling is set up properly, you only have to use value={value}.

Check out the related MDN page here.

about 4 years ago · Juan Pablo Isaza Relatório
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