Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
shrouxm opened this issue Mar 20, 2024 · 0 comments
Closed

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

shrouxm opened this issue Mar 20, 2024 · 0 comments

Comments

@shrouxm
Copy link

shrouxm commented Mar 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants