react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

Text input number of lines and multiline not working in iOS.

Open kissesuu opened this issue 4 months ago • 5 comments

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: Image

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 avatar Aug 19 '25 06:08 kissesuu

@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 avatar Aug 22 '25 11:08 shreykul

@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.

Image

kissesuu avatar Aug 27 '25 06:08 kissesuu

@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.

Image

I'm using react native without expo and react native version is "0.81.0".

shreykul avatar Aug 29 '25 05:08 shreykul

any updates?

NkGromov avatar Sep 22 '25 19:09 NkGromov

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 }}

mluksha avatar Oct 15 '25 15:10 mluksha