add autofocus to IdentityKeyComponent

This commit is contained in:
fmtabbara
2023-02-23 22:58:59 +00:00
parent 6d29774744
commit c08efef8ed
@@ -22,6 +22,7 @@ export const IdentityKeyFormField: FCWithChildren<{
size?: 'small' | 'medium';
sx?: SxProps;
disabled?: boolean;
autoFocus?: boolean;
}> = ({
required,
fullWidth,
@@ -37,6 +38,7 @@ export const IdentityKeyFormField: FCWithChildren<{
showTickOnValid = true,
size,
disabled,
autoFocus,
}) => {
const [value, setValue] = React.useState<string | undefined>(initialValue);
const [validationError, setValidationError] = React.useState<string | undefined>();
@@ -106,6 +108,7 @@ export const IdentityKeyFormField: FCWithChildren<{
InputLabelProps={{ shrink: true }}
size={size}
disabled={disabled}
autoFocus={autoFocus}
/>
);
};