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

155
Visualizações
How can I convert the material ui range sliders output(newValue) to string

I have started using the Material UI library recently. I have used Range slider component. I am handling the change using the handleChange function. Which has 2 arguments event and newValue. When I logged out newValue I got an array with 2 number elements.

The issue is I want the newValue as string

So to do that applied toString() method on the newValue but it gave me an error on Changing the silder position that Failed prop type: Invalid prop value supplied to ForwardRef(Slider), expected one of type [number].

This is the default code snippet

    const handleAgeChange = (event, newValue) => {
        setValue({ ...value, ageRange: newValue })
    };

and this is the one in which I used toString() method

    const handleAgeChange = (event, newValue) => {
        setValue({ ...value, ageRange: newValue.toString() })
    };
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