Not working on first load
Firstly great job on the module, we are implementing this as our internal
` export default class ScrollViewWrapper extends Component{
constructor(props) {
super(props)
}
render() {
var { children, ...otherProps } = this.props;
return (
<KeyboardAwareScrollView ref="scrollView" {...otherProps} showsVerticalScrollIndicator={false} keyboardShouldPersistTaps={true} keyboardDismissMode="on-drag">
{children}
</KeyboardAwareScrollView>
)
}
}`
The Issue:
On first install of the app the scrolling functionality doesn't trigger. However following a force quit and restart of the app it functions as it should. Is there anything you can think of that may be causing this? We are generally rendering Forms using tcomb-react-native, wrapped in a View. Are there any caveats to rendering children?
May well be something local but just curious if you had any ideas before I lose my mind!
Hi @Michaelprothero !
It seems that what you're doing is completely right. Have you tried to run into the device? I use this component with tcomb-form-native always and it's working fine. Which version are you running?
Thanks for the quick response. Yes we are using a debug apk installed onto several QA devices, currently running into this issue in dev on Android 6.0.1. Is there any useful places you can think of for me to debug in regards to detecting keyboard events? Sorry if this is a bit vague still rooting around our code for a cause in the meanwhile.
Mmm you can check here https://github.com/APSL/react-native-keyboard-aware-scroll-view/blob/master/lib/KeyboardAwareMixin.js#L44 when the keyboard event is triggered.
Also, try to disable the automatic scroll with enableAutoAutomaticScroll under Android. I didn't have time enough yet to bring full Android support.
Thats great, will try these and have a hunt around and get back to you if we find anything, thanks for the extremely helpful responses :)
You're welcome @Michaelprothero !