-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
focus method doesn't work #529
Comments
Maybe you should bind the |
Thank you. I couldn't understand the second part of your answer. Could you please elaborate? For the first part, I added const CustomInput = observer(React.forwardRef(({ field, ...restProps }, ref) => (
<Input
{...field.bind()}
{...restProps}
ref={ref}
onChangeText={field.sync}
onFocus={field.onFocus}
onBlur={field.onBlur}
autoFocus={field.focused}
value={field.value}
/>
)); |
I mean this should be enough: const CustomInput = observer(React.forwardRef(({ field, ...restProps }, ref) => (
<Input
{...field.bind()}
{...restProps}
ref={ref}
onChangeText={field.onChange}
/>
)); also, are you sure that |
I checked with console log and |
Can you provide a codesandbox? |
Here: https://codesandbox.io/s/react-native-m4jdu Since a keyboard doesn't show up when a |
maybe this issue occurs only in react native,
|
I see that occurs also with react (not native) |
🎉 This issue has been resolved in version 5.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hello,
I try to focus another input with
field.focus()
but it doesn't work.Below,
form.$('password').focus()
doesn't focus to the next CustomInput.The text was updated successfully, but these errors were encountered: