TextInput breaks when text is too big
See original GitHub issueCurrent behaviour
When value is too big, TextInput
breaks the text as if it has the multiline
prop, but doesn’t expand the container.
I noticed there is some bug on TextInput
with multiline
when creating the app with CRNA, which is my case. Though, I didn’t see anything related with this.
Expected behaviour
The text on the TextInput
shouldn’t add another line below, just shift the content.
Code sample
<View style={styles.inputContainer}>
<TextInput
label={helpModalTitleLabel}
placeholder=''
onChangeText={(title) => this.setState({ title })}
value={this.state.title}
autoCorrect={true}
keyboardType={'default'}
autoCapitalize={'sentences'}
style={styles.input}
/>
</View>
const styles = StyleSheet.create({
inputContainer: {
alignItems: 'center',
padding: 20
},
input: {
width: '100%'
}
});
Screenshots (if applicable)
On this second screenshot, I wrote more than 2 lines of text.
What have you tried
Tried removing the component from inside Overlay
(react-native-elements
), but the bug is still there.
Your Environment
software | version |
---|---|
ios or android | ios |
react-native | 0.55.4 |
react-native-paper | 1.11.0 |
node | 8.11.2 |
npm or yarn | npm 6.1.0 |
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
TextInput: long text results in linebreak #2581 - GitHub
Current behaviour Typing a long text in TextInput and unfocusing it breaks the line Expected behaviour Text is cut off at the end...
Read more >How to use big font size properly in a low height TextInput in ...
Try creating a container to put your text input. Remove the padding horizontal and put that in the container instead of in the...
Read more >Wrapping and breaking text - CSS: Cascading Style Sheets
This guide explains the various ways in which overflowing text can ... This property will break a word once it is too long...
Read more >flexDirection row breaks wrap and forces content off screen
I'm experiencing a similar problem, I have a deeply nested View with row layout. Nothing fancy, just two flex:1 elements side by side....
Read more >TextInput QML Type | Qt Quick 6.4.1
For example: if topPadding and bottomPadding are set to 10 , but the height of the TextInput is only set to 20 ,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@satya164, I cleared the cache and it worked as expected. Thanks!
@satya164 getting the same as the others even with
numberOfLines
. Is this a known issue? I’m using theTextInput
withmode="outlined"