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
@@ -84,6 +84,7 @@ export const OrgIdentityLinkForm = ({ onClose }: Props) => {
onChange={onChange} onChange={onChange}
placeholder="Select machine identity..." placeholder="Select machine identity..."
// onInputChange={setSearchValue} // onInputChange={setSearchValue}
autoFocus
options={rootOrgIdentities} options={rootOrgIdentities}
getOptionValue={(option) => option.id} getOptionValue={(option) => option.id}
getOptionLabel={(option) => option.name} getOptionLabel={(option) => option.name}
@@ -185,7 +185,7 @@ export const OrgIdentityModal = ({ popUp, handlePopUpToggle }: Props) => {
isError={Boolean(error)} isError={Boolean(error)}
errorText={error?.message} errorText={error?.message}
> >
<Input {...field} placeholder="Machine 1" /> <Input {...field} autoFocus placeholder="Machine 1" />
</FormControl> </FormControl>
)} )}
/> />
@@ -170,7 +170,7 @@ export const ProjectIdentityModal = ({ onClose, identity }: ContentProps) => {
isError={Boolean(error)} isError={Boolean(error)}
errorText={error?.message} errorText={error?.message}
> >
<Input {...field} placeholder="Machine 1" /> <Input {...field} autoFocus placeholder="Machine 1" />
</FormControl> </FormControl>
)} )}
/> />
@@ -113,6 +113,7 @@ export const ProjectLinkIdentityModal = ({ handlePopUpToggle }: Props) => {
onChange={onChange} onChange={onChange}
isLoading={isMembershipsLoading} isLoading={isMembershipsLoading}
placeholder="Select machine identity..." placeholder="Select machine identity..."
autoFocus
// onInputChange={setSearchValue} // onInputChange={setSearchValue}
options={filteredIdentityMembershipOrgs.map((membership) => ({ options={filteredIdentityMembershipOrgs.map((membership) => ({
name: membership.name, name: membership.name,