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

156
Views
Texto multilínea en ancho de vista fijo - ¿Reaccionar nativo?

En un componente de encabezado, tengo una vista que tiene un ancho fijo, y el texto dentro de él está cortado, así que quiero que este texto sea como una línea múltiple,

texto

No puedo eliminar el ancho fijo porque depende de otras cosas de desplazamiento.

 const TAB_WIDTH = normalizeWidth(150); <FlatList data={myRoutes} ref={headerRef} contentContainerStyle={{ flexGrow: 1, }} keyExtractor={(item, index) => index.toString()} horizontal showsHorizontalScrollIndicator={false} renderItem={({item, index}) => ( <View style={{ width: TAB_WIDTH, }}> <TouchableOpacity onPress={() => scrollToActiveIndex(index)} style={styles.headerItem}> <Text style={[ styles.labelStyle, { color: activeIndex === index ? buttonBgColor : COLORS.menuText, }, ]}> {item.title}anas </Text> </TouchableOpacity> {activeIndex === index && ( <View style={[styles.headerBar, {backgroundColor: buttonBgColor}]} /> )} </View> )} />
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

puedes usar <Text numberOfLines={2}/>

verificar ellipsizeMode

about 4 years ago · Juan Pablo Isaza Report

0

También recibí el mismo error y apliqué ancho al componente de texto de esta manera

 width: 'YOUR WIDTH'

Puedes aplicar este código

 <Text style={[ styles.labelStyle, { color: activeIndex === index ? buttonBgColor : COLORS.menuText, width: TAB_WIDTH }, ]}> {item.title}anas </Text>

Si encuentras esto útil solo coméntame.

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!