callstack / callstack/react-native-paper
TextInput : Text going multiple lines when I unselect it in IOS
- Ngôn ngữ chính
- TypeScript
- Star
- 14.5k
- Fork
- 2.2k
- Merge trung bình
- 5 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 12
Mô tả
### 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
### Your Environment
| software | version
| --------------------- | -------
| ios | 17.2
| react-native | 0.74.0
| react-native-paper | ^5.12.5
Hướng dẫn đóng góp
Hướng nghiên cứu
Điểm bắt đầu là TextInput của react-native-paper được hiển thị trong phần tái hiện, với multiline được đặt thành true hoặc false trên iOS. Trước tiên, hãy tái hiện hành vi blur bằng ví dụ được cung cấp trên iOS và so sánh với Android. Công việc được xem là hoàn tất khi prop multiline có giá trị false hoặc bị bỏ qua vẫn là một dòng sau khi nhập văn bản dài và bỏ chọn trường, với kiểm thử hồi quy bao phủ hành vi này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- ios, react-native, typescript
- Lĩnh vực
- mobile
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100