/**
* This method should be used as the callback to onFocus in a TextInputs'
* parent view. Note that any module using this mixin needs to return
* the parent view's ref in getScrollViewRef() in order to use this method.
* @param {number} nodeHandle The TextInput node handle
* @param {number} additionalOffset The scroll view's bottom "contentInset".
* Default is 0.
* @param {bool} preventNegativeScrolling Whether to allow pulling the content
* down to make it meet the keyboard's top. Default is false.
*/
scrollResponderScrollNativeHandleToKeyboard: <T>(
nodeHandle: number | React.ElementRef<HostComponent<T>>,
additionalOffset?: number,
preventNegativeScrollOffset?: boolean,
) => void = <T>(){}
In react-native-keyboard-aware-scroll-view's KeyboardAwareHOC.js, contentInset's bottom is this.state.keyboardSpace
Description
Explanation
https://github.com/facebook/react-native/blob/4cc3aa851c181032e8ea441f0cea6459c018c1d8/Libraries/Components/ScrollView/ScrollView.js#L986
https://github.com/APSL/react-native-keyboard-aware-scroll-view/blob/6cbf7b861856467892cef620adf9af46c4603fa8/lib/KeyboardAwareHOC.js#L307
Screenshots