0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

feat(console): autofocus in create modal (#785)

This commit is contained in:
Wang Sijie 2022-05-10 16:42:34 +08:00 committed by GitHub
parent 18ed453628
commit b8143ff1a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -53,7 +53,7 @@ const CreateForm = ({ onClose }: Props) => {
>
<form>
<FormField isRequired title="admin_console.api_resources.api_name">
<TextInput {...register('name', { required: true })} />
<TextInput autoFocus {...register('name', { required: true })} />
</FormField>
<FormField isRequired title="admin_console.api_resources.api_identifier">
<TextInput {...register('indicator', { required: true })} />

View file

@ -53,7 +53,7 @@ const CreateForm = ({ onClose }: Props) => {
>
<form>
<FormField isRequired title="admin_console.users.create_form_username">
<TextInput {...register('username', { required: true })} />
<TextInput autoFocus {...register('username', { required: true })} />
</FormField>
<FormField isRequired title="admin_console.users.create_form_name">
<TextInput {...register('name', { required: true })} />