Skip to content

Commit

Permalink
add auto focus
Browse files Browse the repository at this point in the history
  • Loading branch information
shinyichen committed Nov 1, 2023
1 parent 9731c06 commit 1f096a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Libraries/AddLibraryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const AddLibraryModal = ({
<Flex direction="column" gap={2}>
<FormControl isRequired isInvalid={!!errors?.name}>
<FormLabel>Enter a name for the new library: </FormLabel>
<Input {...register('name', { required: true })} />
<Input {...register('name', { required: true })} autoFocus />
<FormErrorMessage>{errors?.name && errors.name.message}</FormErrorMessage>
</FormControl>
<FormControl>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Libraries/AddToLibraryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ const AddToNewLibraryPane = ({
<Flex direction="column" gap={2}>
<FormControl isRequired isInvalid={!!errors?.name}>
<FormLabel>Enter a name for the new library: </FormLabel>
<Input {...register('name')} />
<Input {...register('name')} autoFocus />
<FormErrorMessage>{errors?.name && errors.name.message}</FormErrorMessage>
</FormControl>
<FormControl>
Expand Down

0 comments on commit 1f096a3

Please sign in to comment.