callstack / callstack/react-native-paper

Text input number of lines and multiline not working in iOS.

未關閉
#4,792 5 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
TypeScript
星號
14.5k
分支
2.2k
平均合併
5 天 23 小時
30 天內合併 PR
12

描述

### Current behaviour

I set the number of lines to be 1 and multiline to false. But the text value was still displaying in 2 lines. It's overflowing.

### Expected behaviour

The text value should display in fixed one line. (like in Android)

### How to reproduce?

` setText(text)}
mode="outlined"
numberOfLines={1}
multiline={false}
/>`

### Preview

iOS:
Image

Android: working fine, showing 1 line.

### What have you tried so far?

Originally, I have a custom TextInput that I'm using where I saw the issue. To rule out the cause, I used the standard TextInput from react native paper and I figured out that they have the same issue.

### Your Environment

| software | version
| --------------------- | -------
| react-native | 0.79.4
| react-native-paper | 5.14.5
| expo sdk | 53.0.15

貢獻指南

開啟貢獻指南

研究方向

先使用 numberOfLines={1} 和 multiline={false} 從提供的 TextInput 重現開始,然後比較所列 React Native Paper 和 Expo 版本中的 iOS 與 Android 行為。當 iOS 輸入框在不溢出的情況下將文字保持在一行,同時保留 Android 行為時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
react-native, typescript
領域
mobile
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。