React-native-elements: How to create multiline (text wrapping) ListItem

Created on 24 Sep 2017  路  3Comments  路  Source: react-native-elements/react-native-elements

I've tried many ways to get title or subTitle to wrap but have been unsuccessful (e.g. flexGrow, containerStyle...) Long lines of text in title or subtitle always show an ellipsis instead of wrapping.

image

I have some long text that I want to wrap so that it's all visible in the ListItem. Is this possible with react-native-elements?

Since wrapping <Text> is the default in React Native, it seems to me there must be code to disable wrapping, that perhaps could be disabled so wrapping is re-enabled.

Using ^0.16.0.

Most helpful comment

The Text component lines work according to the numberOfLines prop. In our case you can use the titleNumberOfLines and subtitleNumberOfLines.

Here's an example of it. https://snack.expo.io/rJs0FdEjb

All 3 comments

The Text component lines work according to the numberOfLines prop. In our case you can use the titleNumberOfLines and subtitleNumberOfLines.

Here's an example of it. https://snack.expo.io/rJs0FdEjb

Closing this as inactive as there's been no activity for over 30 days. If the example provided didn't work for you on the latest version of react-native-elements then ping me to reopen or create a new issue.
Thanks.

Yes, it did work - sorry for not responding. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

6axter82 picture 6axter82  路  3Comments

mateen-hussain picture mateen-hussain  路  3Comments

Tonacatecuhtli picture Tonacatecuhtli  路  3Comments

iRoachie picture iRoachie  路  3Comments

kubido picture kubido  路  3Comments