Hello,
How to select the next TextInput after pressing the “next” keyboard button?i tried with below code but it's not working, please help,
//Funcation
_focusNextField(nextField) {
this.refs[nextField].focus()
}
// UI
onSubmitEditing={() => this._focusNextField('agencyNo')}
returnKeyType = {"next"}
ref="agencyName"
blurOnSubmit={false}
onChangeText={agencyName => this.setState({agencyName: agencyName})}
style={{ height: 40 }} />
value={this.state.agencyFEIN}
ref="agencyNo"
onChangeText={agencyNo=> this.setState({agencyNo: agencyNo})}
style={{ height: 40 }} />
@ap050492 replace
this.refs[nextField].focus()
by
this.refs[nextField]._root.focus()
Thanks, but now working...
when i print refs in console {console.log(this.refs)} it's showing like below
{}
__proto__
:
constructor
:
ƒ Object()
hasOwnProperty
:
ƒ hasOwnProperty()
isPrototypeOf
:
ƒ isPrototypeOf()
propertyIsEnumerable
:
ƒ propertyIsEnumerable()
toLocaleString
:
ƒ toLocaleString()
toString
:
ƒ toString()
valueOf
:
ƒ valueOf()
__defineGetter__
:
ƒ __defineGetter__()
__defineSetter__
:
ƒ __defineSetter__()
__lookupGetter__
:
ƒ __lookupGetter__()
__lookupSetter__
:
ƒ __lookupSetter__()
get __proto__
:
ƒ __proto__()
set __proto__
:
ƒ __proto__()
Closing this issue due to no response
Most helpful comment
@ap050492 replace
by