mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 15:26:35 +00:00
improvement: auto focus first input on create identity forms
This commit is contained in:
+1
@@ -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}
|
||||||
|
|||||||
+1
-1
@@ -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>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|||||||
+1
-1
@@ -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>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|||||||
+1
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user