Skip to content

A self-hosted media server and file management system

fix: every input field tries to auto focus

aminnausinb39294fa2231
diff --git a/resources/js/components/cedar-ui/form/FormInput.vue b/resources/js/components/cedar-ui/form/FormInput.vue
index baa7909f..67756639 100644
--- a/resources/js/components/cedar-ui/form/FormInput.vue
+++ b/resources/js/components/cedar-ui/form/FormInput.vue
@@ -25,7 +25,7 @@ const model = defineModel();
:class="cn(inputClass, 'mt-1')"
:min="field.min"
:max="field.max"
- autofocus
+ :autofocus="field.autofocus"
/>
</template>
</InputShell>
diff --git a/resources/js/types/types.ts b/resources/js/types/types.ts
index dc247462..9cc505f5 100644
--- a/resources/js/types/types.ts
+++ b/resources/js/types/types.ts
@@ -146,6 +146,7 @@ export declare type SortDir = 1 | -1;
export type FormField = Omit<CedarFormField, 'type'> & {
type: FieldType | 'email';
+ autofocus?: boolean;
};
export interface SelectItem {