Merge pull request #5039 from Infisical/auto-focus-input-create-mi-form

improvement: auto focus first input on create identity forms
This commit is contained in:
Scott Wilson
2025-12-12 12:41:56 -08:00
committed by GitHub
4 changed files with 4 additions and 2 deletions

View File

@@ -84,6 +84,7 @@ export const OrgIdentityLinkForm = ({ onClose }: Props) => {
onChange={onChange}
placeholder="Select machine identity..."
// onInputChange={setSearchValue}
autoFocus
options={rootOrgIdentities}
getOptionValue={(option) => option.id}
getOptionLabel={(option) => option.name}

View File

@@ -185,7 +185,7 @@ export const OrgIdentityModal = ({ popUp, handlePopUpToggle }: Props) => {
isError={Boolean(error)}
errorText={error?.message}
>
<Input {...field} placeholder="Machine 1" />
<Input {...field} autoFocus placeholder="Machine 1" />
</FormControl>
)}
/>

View File

@@ -170,7 +170,7 @@ export const ProjectIdentityModal = ({ onClose, identity }: ContentProps) => {
isError={Boolean(error)}
errorText={error?.message}
>
<Input {...field} placeholder="Machine 1" />
<Input {...field} autoFocus placeholder="Machine 1" />
</FormControl>
)}
/>

View File

@@ -113,6 +113,7 @@ export const ProjectLinkIdentityModal = ({ handlePopUpToggle }: Props) => {
onChange={onChange}
isLoading={isMembershipsLoading}
placeholder="Select machine identity..."
autoFocus
// onInputChange={setSearchValue}
options={filteredIdentityMembershipOrgs.map((membership) => ({
name: membership.name,