Skip to content

Feature request: Customisable numberOfLines for List.Item #686

@abn-volk

Description

@abn-volk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions