Feature request: Customisable numberOfLines for List.Item
See original GitHub issueCurrent behaviour
List.Item
’s title and description texts/components are wrapped inside a Text
with fixed numberOfLines
. As a result, long text elements are always cut off (even when using custom text components with numberOfLines
set).
Expected behaviour
It’d be better if there is a way to customise the numberOfLines
for item title/description, or at least a way to disable the default behaviour. I know that I can easily replace List.Item
with a View
, but I’d like to use List.Item
for its standard padding/margin and ripple.
Code sample
Snack: https://snack.expo.io/@jibi/react-native-paper-list.item-numberoflines
Screenshots (if applicable)
What have you tried
- Use a
Subheading
for title withnumberOfLines
- Read the source code -> Write a feature request
Your Environment
software | version |
---|---|
ios or android | Android |
react-native | 0.57 (expo 31) |
react-native-paper | 2.3.1 |
node | 10.2.1 |
npm or yarn | yarn 1.12.3 |
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
React native determine when text is cut off - Stack Overflow
Once you fetch this number, you could check if it's greater than the max number of lines you want to have, and if...
Read more >Customizing Feature Request List Columns in Savio
You can change the list columns on your Savio Feature Request page to suit your workflow. Here's how.
Read more >List and library column types and options - Microsoft Support
To customize the contents of the list, you may need to contact your administrator. You can customize a Person or Group column in...
Read more >Introducing ShortPoint Date Lists Design Element
Item Background Styles. This feature helps you to customize the items' background styles. There are following options ...
Read more >react-native-element-dropdown - npm
A React Native dropdown component easy to customize for both iOS and ... Element, No, Takes an item from data and renders it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop 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
Top GitHub Comments
@raajnadar sometimes guidelines do not correspond to the reality of the data we’re trying to present to users.
Fixed.