callstack / callstack/react-native-paper

TextInput multiline text does not appear centered if only one line

オープン
#3,752 コメント 15 件 リアクション 7 件 担当者 0 名 GitHub で見る
bug TextInput
主要言語
TypeScript
スター
14.5k
フォーク
2.2k
平均マージ
5日 23時間
マージ済み PR(30日)
12

説明

### Current behaviour
When TextInput has `multiline` prop, the text is vertically aligned towards the top if the input field contains only one line (screenshot 1). If the text is longer and shows two or more lines, then everything appears fine and the content is centered accordingly. (screenshot 2). You can see from the image below where i marked the spacings in red

### Expected behaviour
Text Should be centered inside the the TextInput even if it contains text which takes up only a single line.

### How to reproduce?
``

### Preview
![Screenshot 2023-03-14 at 1 41 01 PM](https://user-images.githubusercontent.com/30950825/224910782-f0b7552c-eab5-47f8-9a87-3dba8776b601.png)
![Screenshot 2023-03-14 at 1 41 19 PM](https://user-images.githubusercontent.com/30950825/224910787-88259158-e8a3-4762-b8ef-054b24b64355.png)

### What have you tried so far?
`textAlignVertical="center"` did not work. Couldn't find other issues similar to this.

### Your Environment

| software | version
| --------------------- | -------
| ios | 16
| android | 11
| react-native | 0.66.5
| react-native-paper | 4.11.2
| node | 16.17.0
| npm or yarn | 1.22.19

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。