You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've read through the readme and the issues that seem relevant, but three years later and not using class components how do we do this without needing this? I'm programmatically focusing on a textInput nameInputRef?.current?.focus(); so I don't have the event param for a target.
Trying to cobble the readme together with this #451, but so far no luck
_scrollToInput (reactNode: any) {
// Add a 'scroll' ref to your ScrollView
this.scroll.props.scrollToFocusedInput(reactNode)
}
<KeyboardAwareScrollView
innerRef={ref => {
this.scroll = ref
}}>
<View>
<TextInput
onFocus={(event: Event) => {
// `bind` the function if you're using ES6 classes
this._scrollToInput(ReactNative.findNodeHandle(event.target))
}}
/>
</View>
</KeyboardAwareScrollView>
The text was updated successfully, but these errors were encountered:
I've read through the readme and the issues that seem relevant, but three years later and not using class components how do we do this without needing
this
? I'm programmatically focusing on a textInputnameInputRef?.current?.focus();
so I don't have the event param for a target.Trying to cobble the readme together with this #451, but so far no luck
The text was updated successfully, but these errors were encountered: