improvement: auto focus first input on create identity forms

This commit is contained in:
Scott Wilson
2025-12-12 10:52:35 -08:00
parent aa95b4a0ce
commit 9f37bf6d54
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,