Text input number of lines and multiline not working in iOS.
Current behaviour
I set the number of lines to be 1 and multiline to false. But the text value was still displaying in 2 lines. It's overflowing.
Expected behaviour
The text value should display in fixed one line. (like in Android)
How to reproduce?
<TextInput label="Email" value={text} onChangeText={(text) => setText(text)} mode="outlined" numberOfLines={1} multiline={false} />
Preview
iOS:
Android: working fine, showing 1 line.
What have you tried so far?
Originally, I have a custom TextInput that I'm using where I saw the issue. To rule out the cause, I used the standard TextInput from react native paper and I figured out that they have the same issue.
Your Environment
| software | version |
|---|---|
| react-native | 0.79.4 |
| react-native-paper | 5.14.5 |
| expo sdk | 53.0.15 |
@kissesuu I tried reproducing the error, but it works fine in react native latest version in iOS; maybe it's specific to that version.
@shreykul What version are you using?
I upgraded to:
| software | version |
|---|---|
| react-native | 0.79.4 -> 0.79.5 |
| react-native-paper | 5.14.5 |
| expo sdk | 53.0.15 -> 53.0.22 |
And I am experiencing the same problem.
@shreykul What version are you using?
I upgraded to:
software version react-native 0.79.4 -> 0.79.5 react-native-paper 5.14.5 expo sdk 53.0.15 -> 53.0.22 And I am experiencing the same problem.
![]()
I'm using react native without expo and react native version is "0.81.0".
any updates?
I have the same issue.
"react-native": "0.79.2", "react-native-paper": "5.13.1", "expo": "53.0.9"
It looks like a bug in react-native with a new architecture.
A workaround that works for me:
contentStyle={{ textAlign: undefined }}