diff --git a/app/components/Admin/ModalForm.vue b/app/components/Admin/ModalForm.vue index daa7186..adadc00 100644 --- a/app/components/Admin/ModalForm.vue +++ b/app/components/Admin/ModalForm.vue @@ -18,10 +18,19 @@ interface FileField extends BaseField { interface SearchSelectField extends BaseField { type: "search-select" - fetchOptions: (q: string) => Promise + fetchOptions: (q?: string) => Promise } -export type Field = TextField | FileField | SearchSelectField +interface SearchSelectArrayField extends BaseField { + type: "search-select-array" + fetchOptions: (q?: string) => Promise +} + +export type Field = + | TextField + | FileField + | SearchSelectField + | SearchSelectArrayField interface ModalFormProps { item?: T @@ -65,11 +74,15 @@ const save = async () => {