Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

169
Views
React Native: Scrollview no se desplazará con la dirección de la fila y flexWrap

en mi aplicación nativa de reacción, tengo una vista de desplazamiento donde los elementos de mi lista están envueltos en filas (flexDirection: 'row', flexWrap: 'wrap'), sin embargo, debido a esto, mi vista de desplazamiento no se desplazará por alguna razón ...

Mi vista de desplazamiento:

 <View style={{flex:1}}> <ScrollView vertical={true} contentContainerStyle={{ borderWidth:1,flex:1,flexDirection:'row',flexWrap:'wrap',alignItems: 'flex-start'}}> {root.userStore.passionOptions.map((item,index) => {return ( <Text key={item} onPress={ ()=>{ Alert.alert('kaka') } } style={{ fontSize:18,padding:5,paddingLeft:10,paddingRight:10,color:'rgb(125,125,125)',borderRadius:35,borderWidth:1,borderColor:'rgba(0,0,0,0.1)',margin:5 }}>{item}</Text> ) })} </ScrollView> </View>

EDITAR: Intenté eliminar las propiedades flexWrap y flexDirection y tampoco se desplazará

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Razón para no trabajar:

Tu flexDirection está en conflicto con ScrollDirection.

Solución:

Entonces, para evitar conflictos, puede tener otra Vista dentro de ScrollView y hacer la lógica flexWrap

 <ScrollView> <View style={{ borderWidth:1, flex:1, flexDirection:'row', flexWrap:'wrap', alignItems: 'flex-start' }} > ...Your Views over here... </View> </ScrollView>
about 4 years ago · Juan Pablo Isaza Report

0

A mí me funciona así. Hice scrollView como componente externo.

 <ScrollView> <View lightColor="#eee" style={{ paddingHorizontal: 7, paddingVertical: 5 }} > {children} </View> </ScrollView>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!