From 161b81ffdf8416cfec6812b09349b7d60765a2d7 Mon Sep 17 00:00:00 2001 From: Misode Date: Sat, 17 May 2025 20:43:07 +0200 Subject: [PATCH] Fix #745 item dialog body scaling --- src/app/components/previews/DialogPreview.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app/components/previews/DialogPreview.tsx b/src/app/components/previews/DialogPreview.tsx index 3f6aeb90..d9aa17d6 100644 --- a/src/app/components/previews/DialogPreview.tsx +++ b/src/app/components/previews/DialogPreview.tsx @@ -71,7 +71,9 @@ function DialogBody({ body }: { body: any }) { console.log(item) return
- +
+ +
{b.description &&
@@ -230,9 +232,9 @@ function InputControl({ input }: { input: any }) { } if (type === 'single_option') { - const firstOption = input.options?.find((o: any) => o.initial) ?? input.options?.[0] - const optionLabel = firstOption?.display ?? firstOption?.id ?? '' - const label = input.label_visible === false ? optionLabel : {translate: 'options.generic_value', with: [input.label ?? '', optionLabel]} + const initial = input.options?.find((o: any) => o.initial) ?? input.options?.[0] + const initialLabel = typeof initial === 'string' ? initial : initial?.display ?? initial?.id ?? '' + const label = input.label_visible === false ? initialLabel : {translate: 'options.generic_value', with: [input.label ?? '', initialLabel]} return