bamlab/react-native-formik

withNextInputAutoFocusInput goes to next input on new line for a multiline input

ceonelson opened this issue · 2 comments

using the provided example of:

const MyInput = compose(
    handleTextInput,
    withNextInputAutoFocusInput
)(TextField);

on a <MyInput name="multitest" multiline={true} /> it will go to the next input upon pressing enter instead of adding a new line to the multiline field.

I thought I could work around it by doing this:

const MyMultiInput = compose(
    handleTextInput
)(TextField);

but unfortunately then the normal input above the "multitest" is done it skips the focus to the input below "multitest" that is another normal input.

Any thoughts on how to get around this besides making the multi fields the first or last fields in the form?

What about something like this?

master...ceonelson:patch-1

(haven't tested it yet needed to be in bed when i posted the issue but still wanted to get your thoughts)

Have you found any solution @ceonelson ?