just wondering if there's a way to prevent React Native Text Input from breaking text into multiple lines when text is long
Asked
Active
Viewed 29 times
0

Rick Enciso
- 3,145
- 3
- 14
- 14
-
are you using any specific library or the default textInput ? – nazmul Aug 14 '23 at 07:14
-
it's the default one – Rick Enciso Aug 14 '23 at 16:48
1 Answers
2
Just use multiline and numberOflines props like following ,
<TextInput multiline={false} numberOfLines={1} />

nazmul
- 367
- 2
- 14
-
Thanks! that was very helpful, already had it setup like that, that's why I was so confused, I did some tweaks here and there, the issue was that I needed some `vertical padding` along with the `multiline:false` and `numberOfLines:1`. – Rick Enciso Aug 27 '23 at 18:20