-
-
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
fix: input label not visible on ios if multiline, fixes #4482 #4497
base: main
Are you sure you want to change the base?
fix: input label not visible on ios if multiline, fixes #4482 #4497
Conversation
Hey @damianfilipek81, thank you for your pull request 🤗. The documentation from this branch can be viewed here. |
@gedu Is this planned to be merged? Still an issue in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the fix and works good, the issue is gone. I just found one little improvement that can be done. Beside that all good 👍
@@ -138,7 +138,7 @@ const InputLabel = (props: InputLabelProps) => { | |||
// This gives the effect of animating the color, but allows us to use native driver | |||
<View | |||
pointerEvents="none" | |||
style={[StyleSheet.absoluteFill, styles.overflow]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to apply styles.labelContainer
twice. Can you get rid of it from line 147
?
Worth checking that this PR fixes the issue on web as well. Since I posted the issue (#4482) I found this also is a problem on web. |
@ericpoulinnz I tested it and the issue is gone on web as well |
Motivation
This PR solves this issue. "When focusing into a TextInput (when mode='flat'), the label disappears. It shows up normally when multiline=false, and this is only a problem on iOS."
Related issue
issue
Test plan
I've checked it on ios simulator and android emulator, since example project is on expo 48 i cannot install it on my phone.
I've also updated
TextInput.test.tsx.snap
snapshot since tests were failing.