Skip to content

bug: text input label text wraps even when there is room  #4350

Closed
@garobrik

Description

@garobrik

Current behaviour

When creating a text input, the label wraps unnecessarily when there is text in the input. I think this is because the text wrapping is computed for the full size label text, but the label is then transformed down to a size where it would fit, but it has already been wrapped.

For normal text input use cases this isn't an issue since there should be room for the label at full size anyway, but sometimes you have a text input which always has text in it, in which case there could be room for more label text if it wasn't wrapping.

Expected behaviour

The label should not wrap when it can fit.

How to reproduce?

Very simple reproduction: https://snack.expo.dev/mf5yQVdZFDIQdswyr8T6p

Preview

image

What have you tried so far?

Fiddling with the maxWidth and label text.

Your Environment

It's an issue on all environments.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions