Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent Text scrolling and truncation in TextInput field

I have TextInput fields in my React-Native application and I cannot get the text in the field to not scroll and truncate the bottom of the text without setting the line height to something really large.

Here is a image of what is happening:

The styles props are as follows:

input: {
  height: 28, 
  paddingBottom: 0, 
  fontSize: 18,  
  color: '#000', 
  borderBottomWidth: 1.5,    
},

Is there a way I can force the text to not move within the TextInput

like image 443
ProfessionalAmateur Avatar asked Jan 02 '23 04:01

ProfessionalAmateur


1 Answers

TextInput in android seems to have a default paddingBottom set whereas iOS doesn't, because android have underline tag but ios doesn't .Different default paddings for each platform.

That why paddingBottom or paddings is not working properly.

Please check following link

like image 89
Vishal Dhanotiya Avatar answered Feb 11 '23 18:02

Vishal Dhanotiya