Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

164
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda