-
-
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
How to set field autoFocus? #524
Comments
It is not possible because it should eventually unfocus also all other fields recursively if you use You can use hooks like this: new MobxReactForm({
fields: [{
name: 'firstName',
label: 'First Name',
}],
}, {
hooks: {
onInit(form) {
form.$('firstName').focus();
}
}
}); |
If it doesn't work yet use |
🎉 This issue has been resolved in version 5.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hi, thank you for
mobx-react-form
!Is it possible to set up
autoFocus
of a particular field totrue
through the field configuration without callingfocus()
method explicitly?This way obviously isn't working:
The text was updated successfully, but these errors were encountered: