Skip to content
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

Fix single-line TextInput height growth issue in examples #48353

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MobinAkhter
Copy link

Summary:

This PR fixes the unexpectedly growing height of the single-line TextInput example by ensuring multiline={false}, numberOfLines={1}, and removing vertical padding.

Previously, the single-line text input in the provided example would grow in height as the user typed more characters. Attempts to fix this through native code changes were not effective. The root cause was JS-side styling and props that induced multiline or added extra vertical space.

Updated the ExampleTextInput usage to explicitly set multiline={false}, numberOfLines={1}, and paddingVertical: 0. This ensures the input remains a stable, single line with no vertical growth.

Changelog:

[General] [Fixed] - Single-line TextInput example no longer grows in height unexpectedly.

Test Plan:

Manually tested the modified example to confirm that the TextInput no longer grows vertically when typing on an Android emulator.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants