Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage with KeyboardAwareScrollView (wix): Get refs to actual TextInputs? #104

Open
skizzo opened this issue Feb 21, 2017 · 0 comments
Open

Comments

@skizzo
Copy link

skizzo commented Feb 21, 2017

Hi,
I'm using wix's KeyboardAwareScrollView, which comes with the feature of auto-scrolling to specific TextInputs.

For this, I'd need a ref to the actual TextInput component, since the principle is this:

<KeyboardAwareScrollView 
  keyboardShouldPersistTaps={true} 
  style={{flex: 1, paddingHorizontal: 10}}
  getTextInputRefs={() => { 
    const {first_name} = this.refs.registrationForm.refs
    return [first_name]
    // --> this leads to error: textInputRef.isFocused is not a function.
  }}
  >

  <Form
    ref='registrationForm'
    >
    <InputField
      ref='first_name'
      placeholder='First Name'
      />
  </Form>
</KeyboardAwareScrollView>

So my question is, is there any way I can get the actual ref to the TextInput in my getTextInputRefs function?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant