From 2ab12b80c0ad3a32f97f315246d8f55a1012b35f Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Fri, 8 Nov 2024 11:13:04 +0100 Subject: [PATCH] refactor: added property --- packages/components/src/components/input/input.lite.tsx | 1 + packages/components/src/shared/model.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/packages/components/src/components/input/input.lite.tsx b/packages/components/src/components/input/input.lite.tsx index ee42440185d..ddb4b9b793f 100644 --- a/packages/components/src/components/input/input.lite.tsx +++ b/packages/components/src/components/input/input.lite.tsx @@ -184,6 +184,7 @@ export default function DBInput(props: DBInputProps) { form={props.form} pattern={props.pattern} autocomplete={props.autocomplete} + autofocus={props.autofocus} onInput={(event: ChangeEvent) => state.handleInput(event) } diff --git a/packages/components/src/shared/model.ts b/packages/components/src/shared/model.ts index ce01da0a53b..2a3a5c26654 100644 --- a/packages/components/src/shared/model.ts +++ b/packages/components/src/shared/model.ts @@ -33,6 +33,11 @@ export type GlobalProps = { * React specific for render process. */ key?: string; + + /** + * Before using please check for the [accessibility concerns](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_concerns) + */ + autofocus?: boolean; }; export type GlobalState = {