question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Focusing RkTextInput

See original GitHub issue

Hi,

I tried to implement the code to focus on the next text input field but I cannot get it to work.

<RkTextInput style={InputStyles.inputContainer} labelStyle={InputStyles.label} inputStyle={InputStyles.text} label='Password' placeholder="minimum 8 characters" secureTextEntry={true} autoCapitalize='none' autoCorrect={false} returnKeyType='next' keyboardType='default' ref="password" onSubmitEditing={() => this.refs.confirmPassword.focus() }/>

Any idea on how I can focus on the next RkTextInput please?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
SashaSkywalkercommented, Sep 11, 2017

Hi, you can focus it with this.refs.confirmPassword._focusInput(),

I guess we will refactor name of method in future.

1reaction
galeon16commented, Nov 26, 2018

Hey! be careful… the function is “the input ref”.focusInput( ); not ._focusInput( ); 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - React Native TextInput focus
Accessing the native element in react native works differently. First you need to create a React.ref that will hold the native element ...
Read more >
react-native-ui-kitten/CHANGELOG.md
8, * **rkTextInput:** focus behavior when `onPress` called ([3598613](https://github.com/akveo/react-native-ui-kitten/commit/3598613)).
Read more >
Stateless function components cannot hav refs-Reactjs
You're using RkTextInput which is a functional component and it cannot have a ref. That's why you can't focus it. I don't see...
Read more >
UI Kitten - Input - component api - GitHub Pages
Called when input field looses focus. placeholder, string. A string to be displayed when there is no value. disabled, boolean.
Read more >
Focus on the Next TextInput when Next Keyboard Button is ...
We will use a combination of refs, `onSubmitEditing` callback, `returnKeyType`, and `blurOnSubmit` to move between text inputs when submitted.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found