callstack / callstack/react-native-paper

TextInput's textarea component doesn't grow with height of TextInput

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

説明

### Current behaviour
I set a TextInput component with `style={{flex:1]]` and `multiline`. The outer bounds of the input grows vertically as expected, but the bounds of the textarea within it are not growing.

### Expected behaviour
If I set the height of the TextInput larger, the multiline textarea should grow with it.

### How to reproduce?
Here's a snack that shows the problem:
https://snack.expo.dev/@jmbldwn/textinput?name=TextInput&description=https%3A%2F%2Fcallstack.github.io%2Freact-native-paper%2Ftext-input.html&code=import%20*%20as%20React%20from%20%27react%27%3B%0Aimport%20%7B%20TextInput%20%7D%20from%20%27react-native-paper%27%3B%0A%0Aconst%20MyComponent%20%3D%20()%20%3D%3E%20%7B%0A%20%20const%20%5Btext%2C%20setText%5D%20%3D%20React.useState(%22%22)%3B%0A%0A%20%20return%20(%0A%20%20%20%20%3CTextInput%0A%20%20%20%20%20%20label%3D%22Email%22%0A%20%20%20%20%20%20value%3D%7Btext%7D%0A%20%20%20%20%20%20onChangeText%3D%7Btext%20%3D%3E%20setText(text)%7D%0A%20%20%20%20%2F%3E%0A%20%20)%3B%0A%7D%3B%0A%0Aexport%20default%20MyComponent%3B&dependencies=react-native-paper,@expo/vector-icons%40%5E13.0.0,react-native-safe-area-context

### Preview
See Snack.

### What have you tried so far?
The stock react native TextInput doesn't have this problem.
I am able to force flex attributes on the textarea in my debugger, but this isn't a solution.

### Your Environment

| software | version
| --------------------- | -------
| ios | n/a
| android | n/a
| react-native | 0.69.4
| react-native-paper | 5.2.0
| node | 14.16.0
| npm or yarn | yarn 1.x
| expo sdk | 46.0.7

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

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

調査の方向性

リンクされた Expo Snack を react-native-paper TextInput、multiline、および明示的な高さを使って再現します。次に、TextInput コンポーネントの multiline textarea パスを調べます。内側の textarea が外側の TextInput の高さに合わせて拡大し、関連する動作が適切なテストでカバーされていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
react-native, typescript
領域
mobile-dev
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

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

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