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

337
Vistas
(React Native) scrollsToTop prop not working

My App has

return(
    <ScrollView style={{ backgroundColor: "#262423", flex: 1 }} scrollsToTop={true}>
         ...my ScrollView
    </ScrollView>
)

but when I tap on the Status Bar of my iOS device, the ScrollView doesn't scroll to the top.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try Like this

import { useRef } from 'react';
const scrollRef = useRef();

const onPressTouch = () => {
scrollRef.current?.scrollTo({
y: 0,
animated: true,
});
}

<ScrollView ref={scrollRef}>
...your elements
</ScrollView>

<TouchableOpacity onPress={onPressTouch}></TouchableOpacity>
about 4 years ago · Juan Pablo Isaza Denunciar
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