callstack / callstack/react-native-paper

TextInput : Text going multiple lines when I unselect it in IOS

未关闭
#4,523 10 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看
bug TextInput
主要语言
TypeScript
星标
14.5k
派生
2.2k
平均合并
5 天 23 小时
30 天内合并 PR
12

描述

### Current behaviour
I am getting an issue in the react native paper Text input component when I add multiline functionality, which means making their value true, then it works fine, but when I make their value false or do not add the multiline key, then when I enter long text and unselect the Textfield the text expand to multiple lines. it only happens in iOS, in Android, it works fine as expected.

### Expected behaviour
if i add multiline functionality then they need to show text in multi-lines but when I make the value of multiline false then not need to take and show text in multi-line

### Code
```
import {SafeAreaView, StyleSheet} from 'react-native';
import React, {useState} from 'react';
import {TextInput} from 'react-native-paper';

const App = () => {
const [surname, setSurName] = useState('');
const [forename, setForeName] = useState('');

return (

setSurName(value)}
outlineColor={'blue'}
activeOutlineColor={'black'}
label={'Surname'}
placeholder="Enter Surname"
placeholderTextColor={'grey'}
mode="outlined"
multiline={true}
/>
setForeName(value)}
outlineColor={'blue'}
activeOutlineColor={'black'}
label={'Forename'}
placeholder="Enter Forename"
placeholderTextColor={'grey'}
mode="outlined"
multiline={false}
/>

);
};

export default App;
const styles = StyleSheet.create({
inputfield: {
marginHorizontal: 20,
marginVertical: 20,
},
});

```

### Preview
image

### Your Environment

| software | version
| --------------------- | -------
| ios | 17.2
| react-native | 0.74.0
| react-native-paper | ^5.12.5

贡献指南

打开贡献指南

调研方向

入口点是复现中显示的 react-native-paper TextInput,在 iOS 上将 multiline 切换为 true 或 false。首先使用提供的示例在 iOS 上复现 blur 行为,并与 Android 进行比较。完成标准是:在输入长文本并取消选择该字段后,值为 false 或被省略的 multiline prop 仍保持单行,并为该行为提供回归覆盖。

由索引模型根据 Issue 内容生成。

评估

技术栈
ios, react-native, typescript
领域
mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。