question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: Customisable numberOfLines for List.Item

See original GitHub issue

Current 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)

Imgur

What have you tried

  • Use a Subheading for title with numberOfLines
  • 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:closed
  • Created 5 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
tonyxiaocommented, Mar 2, 2019

@raajnadar sometimes guidelines do not correspond to the reality of the data we’re trying to present to users.

0reactions
ferrannpcommented, Jul 19, 2019

Fixed.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found