[Layout] Text overflow in ListView with flexDirection: 'row'
See original GitHub issueHi, I have problem with text overflow in ListView, when ancestor has set style flexDirection: ‘row’:
part of code:
render: function() {
return (
<View style={styles.container}>
<ListView
dataSource={this.state.dataSource}
renderRow={this.renderRow}
/>
</View>
);
},
renderRow: function (message, sectionID: number, rowID: number) {
return (
<View style={{flexDirection: 'row'}}>
<Image
source={{
uri: 'http://icons.iconarchive.com/icons/designbolts/free-male-avatars/128/Male-Avatar-icon.png',
}}
style={{flexWrap: 'wrap', width: 32, height:32}}
/>
<View style={{flexWrap: 'wrap'}}>
<Text>
{message}
</Text>
</View>
</View>
);
},
How to wrap text? Thanks.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:29 (7 by maintainers)
Top Results From Across the Web
Listview with flexbox showing all items in one row
In my code below, there is a listview with section headers. Each section header has items under it. The problem is, all items...
Read more >flex.direction - API Reference - Kendo UI ListView
Defines the direction flex items are placed in the flex container. Think of flex items as primarily laying out either in horizontal rows...
Read more >FlexboxLayout - NativeScript-Vue
<FlexboxLayout> is a layout container that provides a non-exact implementation of the CSS Flexbox layout. This layout lets you arrange child components both ......
Read more >Layout Props - React Native
flexDirection controls which directions children of a container go. row goes left to right, column goes top to bottom, and you may be...
Read more >The Xamarin.Forms FlexLayout - Microsoft Learn
Forms StackLayout in that it can arrange its children horizontally and vertically in a stack. However, the FlexLayout is also capable of ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I solved problem by set
flex: 1
to wrapper view of text.This issue should not be closed. Basically, if you use flexDirection : ‘row’, text wrapping doesn’t work. There doesn’t seem to be a clear workaround. Using flex : 1 now collapsed your content to nothing/invisible, so that workaround is gone. A very basic layout aspect is now a total time wasting nightmare. Please fix this!