Open pranav-flyfin opened 2 years ago
Not sure if we have the same problem but I'm able to get the <KeyboardAwareFlatList>
to scroll the textInput into view when it is in focus however if the text input field grows because it's set to multiline the bottom of my text disappears below the keyboard.
Setting scrollEnabled={false}
for TextInput works for me. Refer this issue for more help.
But it will restrict the input to get scroll. So the lines won't be visible to users if he is writting multilines.
For that you can write your custom AutogrowTextInput which will increase height of textinput on change of textinput layout
But still it's not a proper solution.
Try this:
constructor(props) {
super(props);
this.state = {
scrollEnabled: true
}
}
onFocus() {
let self = this;
// disable scroll until the library does its own magic
this.setState({
scrollEnabled: false
});
// enable scroll again after 1 sec
setTimeout(function() {
self.setState({
scrollEnabled: true
})
}, 1000)
}
onBlur() {
// enable scroll on blur
this.setState({
scrollEnabled: true
})
}
<TextInput
scrollEnabled={this.state.scrollEnabled}
onFocus={()=> this.onFocus()}
onBlur={()=> this.onBlur()}
multiline=true
/>
Setting
scrollEnabled={false}
for TextInput works for me. Refer this issue for more help.
this work for me :)
scrollEnabled={false
It doesn't work for me😭 ,Do the other heroes have any other solutions?help!!!
The scroll is not enabling when input is multiline. when I am making my inputText field false it is working fine. does anyone have a solution?