Skip to content

Border appears in TextInput label when label is too long #2954

@achilders1988

Description

@achilders1988

Current behaviour

If the label on a TextInput is too long, and the mode is outlined, when you focus the field and the label moves up there will be a part of the border that appears after the first letter in the label, and between the rest of the word.

Expected behaviour

I would expect that the border would not be visible under the label text.

Code sample

https://snack.expo.dev/@achilders1988/textinput
https://snack.expo.io/@achilders1988/textinput

import * as React from 'react';
import { TextInput } from 'react-native-paper';

const MyComponent = () => {
const [text, setText] = React.useState('');

return (
<TextInput
label="This is a super long label to make the bug appear"
mode="outlined"
value={text}
onChangeText={text => setText(text)}
/>
);
};

export default MyComponent;

Screenshots (if applicable)

Screen Shot 2021-10-28 at 1 17 50 PM

What have you tried

It works as expected until the label gets long and the ... appears, then this issue occurs.

Your Environment

software version
ios or android both & web
react-native "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz"
react-native-paper 4.9.2
node 14.4.0
npm or yarn 6.14.5
expo sdk 42.0.3

https://snack.expo.dev/@achilders1988/textinput

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions