mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Autofocus first input in create item form (#9583)
* autofocus first input in create form * add autofocus to translations interface * avoid setting firstEditableField to hidden fields * Base autofocus on prop Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
:model-value="firstItem"
|
||||
:initial-values="firstItemInitial"
|
||||
:badge="languageOptions.find((lang) => lang.value === firstLang)?.text"
|
||||
:autofocus="autofocus"
|
||||
@update:modelValue="updateValue($event, firstLang)"
|
||||
/>
|
||||
<v-divider />
|
||||
@@ -82,6 +83,10 @@ export default defineComponent({
|
||||
type: Array as PropType<(string | number | Record<string, any>)[] | null>,
|
||||
default: null,
|
||||
},
|
||||
autofocus: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ['input'],
|
||||
setup(props, { emit }) {
|
||||
|
||||
Reference in New Issue
Block a user