• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

210
Vistas
React Native - Disable nested scrolling

I have a parent FlatList which, in its footer, can render another flatlist or a simple scroll view.

const renderFooter1 = () => {
   return <ScrollView> ... </ScrollView>;
}

const renderFooter2 = () => {
   return <FlatList ... />;
}

// Note: I am not doing this in real life, just an example for handling both possible footers
return (
   <FlatList 
      refreshControl={renderRefreshControl()}
      ListHeaderComponent={renderHeader()}
      ListFooterComponent={Math.random() * 10 > 0.5 ? renderFooter1() : renderFooter2()}
      showsVerticalScrollIndicator={false}
   />
);

The problem I am experiencing is that, sometimes, when scrolling down, the component which scrolls is the footer, and not the parent list.

How can I avoid that behavior?

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

0

You can add the prop scrollEnabled={false} to whichever FlatList you don't want to scroll.

about 3 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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda