douglasjunior / react-native-keyboard-manager

⚛ Library to prevent issues of keyboard sliding up and cover inputs on React-Native iOS projects.
https://www.npmjs.com/package/react-native-keyboard-manager
MIT License
971 stars 59 forks source link

Multi-line input not following input caret #57

Closed JeremyBradshaw7 closed 5 years ago

JeremyBradshaw7 commented 5 years ago

Awesome library, but I'm finding that when the input is in a scrollview and the library scrolls down to a multi-line input, if returns are input to force a new line, the library doesn't scroll the view down further to allow the user to automatically see what he is typing, he has to scroll manually. Inputs are in a modal but not sure this is a modal issue.

douglasjunior commented 5 years ago

Take a loot at the Sample Project.

Try to add this code to the multi-line inputs:

onLayout={() => {
        // When the input size changes, it updates the keyboard position.
        KeyboardManager.reloadLayoutIfNeeded();
}}
JeremyBradshaw7 commented 5 years ago

Awesome, thanks. Would be nice to see this happen automatically though, via a config option perhaps.