From ea7f070b2ca22a9855a12d9458b4cb75c55bc742 Mon Sep 17 00:00:00 2001 From: axolotle Date: Fri, 5 Jul 2024 17:17:47 +0200 Subject: [PATCH] refactor: SelectItem typing --- .../globals/formItems/SelectItem.vue | 48 ++++++++++++------- app/src/types/form.ts | 4 ++ 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/app/src/components/globals/formItems/SelectItem.vue b/app/src/components/globals/formItems/SelectItem.vue index 8b1d9e6f..aa3aab18 100644 --- a/app/src/components/globals/formItems/SelectItem.vue +++ b/app/src/components/globals/formItems/SelectItem.vue @@ -1,36 +1,50 @@ diff --git a/app/src/types/form.ts b/app/src/types/form.ts index 12ef8caf..821e7ed6 100644 --- a/app/src/types/form.ts +++ b/app/src/types/form.ts @@ -72,3 +72,7 @@ export type InputItemProps = BaseWritableItemProps & { | 'time' | 'url' } + +export type SelectItemProps = BaseWritableItemProps & { + choices: string[] | { text: string; value: string }[] +}