如何使用tcomb-form-native选项卡到下一个输入字段?

How do I tab to next input field with tcomb-form-native?

Using the tcomb-form-native library with react native - I've set the return key type to be next. How do I implement the tab/next behavior so that it focuses on the next field in the form?

I can override the onSubmitEditing property of the options object in the form to specifically set focus on the next form field.

      ref={(c) => { this.loginForm = c; }}
      options={{
          fields: {
            email: {
              autoCapitalize: 'none',
              keyboardType: 'email-address',
              error: 'Invalid email',
              returnKeyType: 'next',
              onSubmitEditing: () => this.loginForm.getComponent('password').refs.input.focus(),
            },
            password: {
              password: true,
              secureTextEntry: true,
              error: 'Invalid password',
              onSubmitEditing: () => this.submit(),
            },
          },