scaffolder: add support for ui:autofocus to TextValuePicker

Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
Mike Lewis
2021-08-05 12:35:08 +01:00
parent 6dd98f9796
commit f9694b02e6
@@ -23,6 +23,7 @@ export const TextValuePicker = ({
schema: { title, description },
rawErrors,
formData,
uiSchema: { 'ui:autofocus': autoFocus },
}: FieldProps<string>) => (
<TextField
label={title}
@@ -32,5 +33,6 @@ export const TextValuePicker = ({
onChange={({ target: { value } }) => onChange(value)}
margin="normal"
error={rawErrors?.length > 0 && !formData}
inputProps={{ autoFocus }}
/>
);