From e952dd7b7a96474b715be603a7e2a21ba97507a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20T=C3=A4kker?= Date: Tue, 3 Feb 2026 15:32:32 +0100 Subject: [PATCH] Added multiple field to SearchSelect and ModalForm --- app/components/Admin/ModalForm.vue | 19 +++++- app/ui/SearchSelect.vue | 99 +++++++++++++++++++++++++----- 2 files changed, 99 insertions(+), 19 deletions(-) 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 () => {