From f9694b02e6af4e9cbcb5c9f9b5ac28077baa68f9 Mon Sep 17 00:00:00 2001 From: Mike Lewis Date: Thu, 5 Aug 2021 12:35:08 +0100 Subject: [PATCH] scaffolder: add support for ui:autofocus to TextValuePicker Signed-off-by: Mike Lewis --- .../src/components/fields/TextValuePicker/TextValuePicker.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/scaffolder/src/components/fields/TextValuePicker/TextValuePicker.tsx b/plugins/scaffolder/src/components/fields/TextValuePicker/TextValuePicker.tsx index 20e19d8526..f391843f73 100644 --- a/plugins/scaffolder/src/components/fields/TextValuePicker/TextValuePicker.tsx +++ b/plugins/scaffolder/src/components/fields/TextValuePicker/TextValuePicker.tsx @@ -23,6 +23,7 @@ export const TextValuePicker = ({ schema: { title, description }, rawErrors, formData, + uiSchema: { 'ui:autofocus': autoFocus }, }: FieldProps) => ( onChange(value)} margin="normal" error={rawErrors?.length > 0 && !formData} + inputProps={{ autoFocus }} /> );