2

I am using the TextInput component of React Native Paper. But I am getting the outline in the UI even though I am putting borderwidth:0.

enter image description here

This doesn't appears when we are giving the input (when the num-pad is on)

Can someone please tell how to remove this.

render={({field: {onChange, onBlur, value}}) => (
          <TextInput
            keyboardType="decimal-pad"
            autoFocus
            //type= "outlined"
            maxLength={10}
            left={element}
            placeholder="Phone Number"
            style={{
              width: s(250),
              height: s(35),
              borderRadius: s(20),
              backgroundColor: theme.colors.white,
              //borderWidth: 0,
            }}
            onBlur={onBlur}
            theme={{
              roundness: s(20),
            }}
            onChangeText={onChange}
            value={value}
          />
        )}
Tanish Gupta
  • 400
  • 2
  • 8
  • 20
  • ==> You can also approve my answer for no more extended need for support from the StackOverflow community & also for my motivation. – Ankit Vora Dec 28 '22 at 09:42

2 Answers2

2

add these property of TextInput

activeUnderlineColor="white" underlineColor="transparent"

ABDULLAH
  • 550
  • 3
  • 13
1

==> you need to add this also.

<TextInput
            mode="outlined"
            outlineColor=theme.colors.white
            keyboardType="decimal-pad"
            autoFocus
            //type= "outlined"
            maxLength={10}
            left={element}
            placeholder="Phone Number"
            style={{
              width: s(250),
              height: s(35),
              borderRadius: s(20),
              backgroundColor: theme.colors.white,
              //borderWidth: 0,
            }}
            onBlur={onBlur}
            theme={{
              roundness: s(20),
            }}
            onChangeText={onChange}
            value={value}
          />
Ankit Vora
  • 568
  • 2
  • 12