Skip to content

Text numberOfLines prop is not respected in Nested Text #22811

@mloureiro

Description

@mloureiro

name: 🐛 Bug Report
about: Report a reproducible bug or regression in the core React Native library.

Environment

[skip envinfo]
This is reproducible in the expo playground

Description

Property numberOfLines is not respected when used in a child Text component:

<Text>
  <Text  numberOfLines={1}>{'sometext'.repeat(1000)}</Text>
</Tex>

In this #4733 (comment) @oureta mentions that this does not work, I don't understand if it is expected behavior, or a 🐛

According to Text doc the styling has some limitations with inheritance/nesting, although nothing is specified (AFAICT) about the other properties.

Reproducible Demo

https://snack.expo.io/H1IZHzGbN

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions