-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
TextInput without label wraps the value of the field #2684
Comments
Couldn't find version numbers for the following packages in the issue:
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3. The versions mentioned in the issue for the following packages differ from the latest versions on npm:
Can you verify that the issue still exists after upgrading to the latest versions of these packages? |
Couldn't find version numbers for the following packages in the issue:
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3. The versions mentioned in the issue for the following packages differ from the latest versions on npm:
Can you verify that the issue still exists after upgrading to the latest versions of these packages? |
Couldn't find version numbers for the following packages in the issue:
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3. The versions mentioned in the issue for the following packages differ from the latest versions on npm:
Can you verify that the issue still exists after upgrading to the latest versions of these packages? |
Couldn't find version numbers for the following packages in the issue:
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3. The versions mentioned in the issue for the following packages differ from the latest versions on npm:
Can you verify that the issue still exists after upgrading to the latest versions of these packages? |
Upgraded some of the tooling, and reflected that in the edited comment. Issue is still appearing with environment details above. Not using Expo. |
I have managed to solve my requirements, by adjusting some styles based on the behaviour the padding creates after some investigation into how the paper component works and calculates the padding when the label is present. The styles I used to adjust to what I needed were;
and the component based on example given;
This adjusts it to match the expected 64 height set for a flat text input component. I also had to adjust my right icon adornments due to the additional padding, so would expect all adornments to be affected. The bug is still present however, and doesn't function as expected where the value should simply clip rather than wrap as though it's a multiline. As I am providing a "hack" where I am technically still showing the label, but hiding it from being seen. |
@lukewalczak Looks like it is the exact same issue. Which is great as now I can remove the hack 😅 Happy for this issue to be closed if not needed now. |
Current behaviour
When using a TextInput component, if I omit the label prop on iOS and then input something longer than the input's width, the value will wrap onto the next line. Also note I am not using multiline so this isn't expected behaviour.
Expected behaviour
I should expect the value not to wrap, but instead clip the value of the text input.
Code sample
Screenshots (if applicable)
What have you tried
Steps to fix: N/A
Steps to reproduce:
Your Environment
The text was updated successfully, but these errors were encountered: