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

[Android Only] Enabling multiline in TextInput without height has the text not centered

Open Zeraan opened this issue 2 years ago • 2 comments

Using latest React-Native-Paper version (4.12.4), ran across this issue. On android only, if you enable multiline in TextInput, but doesn't specify a height, the text is moved upward vertically a bit, different from the label text: Screenshot_20220914_163521

The textinput field does correctly expand when new lines are added, but it's a bit jarring having the first line be not centered.

Zeraan avatar Sep 14 '22 22:09 Zeraan

Couldn't find version numbers for the following packages in the issue:

  • react-native
  • react-native-paper
  • react-native-vector-icons

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

github-actions[bot] avatar Sep 14 '22 22:09 github-actions[bot]

Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a snack.expo.dev link or link to a GitHub repo under your username).

Can you provide a minimal repro which demonstrates the issue? A repro will help us debug the issue faster. Please try to keep the repro as small as possible and make sure that we can run it without additional setup.

github-actions[bot] avatar Sep 14 '22 22:09 github-actions[bot]

I also experience this issue with TextInput and multiline enabled (when TextInput mode is 'outlined'). On Android the text is not centred. If I remove multiline true, everything is back to normal. The TextInput code that has an issue on Android is as follows:

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

const MyComponent = () => {

  const [text, setText] = React.useState("Value");

  return (
    <TextInput
      mode="outlined"
      label="Label"
      value={text}
      onChangeText={text => setText(text)}
      multiline
    />
  );
};

export default MyComponent;

PunainenAurinko avatar Oct 17 '22 19:10 PunainenAurinko

Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

github-actions[bot] avatar Nov 17 '22 02:11 github-actions[bot]