File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/app/components/previews Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,9 @@ function DialogBody({ body }: { body: any }) {
71
71
console . log ( item )
72
72
return < div style = { `display: flex; gap: ${ px ( 2 ) } ; align-items: center; gap: ${ px ( 4 ) } ` } >
73
73
< div style = { `width: ${ px ( b . width ?? 16 ) } ; height: ${ px ( b . height ?? 16 ) } ` } >
74
- < ItemDisplay item = { item } tooltip = { b . show_tooltip ?? true } />
74
+ < div style = { `width: ${ px ( 16 ) } ; height: ${ px ( 16 ) } ` } >
75
+ < ItemDisplay item = { item } tooltip = { b . show_tooltip ?? true } />
76
+ </ div >
75
77
</ div >
76
78
{ b . description && < div style = { `max-width: ${ px ( b . description . width ?? 200 ) } ;` } >
77
79
< TextComponent component = { b . description . contents } />
@@ -230,9 +232,9 @@ function InputControl({ input }: { input: any }) {
230
232
}
231
233
232
234
if ( type === 'single_option' ) {
233
- const firstOption = input . options ?. find ( ( o : any ) => o . initial ) ?? input . options ?. [ 0 ]
234
- const optionLabel = firstOption ? .display ?? firstOption ?. id ?? ''
235
- const label = input . label_visible === false ? optionLabel : { translate : 'options.generic_value' , with : [ input . label ?? '' , optionLabel ] }
235
+ const initial = input . options ?. find ( ( o : any ) => o . initial ) ?? input . options ?. [ 0 ]
236
+ const initialLabel = typeof initial === 'string' ? initial : initial ? .display ?? initial ?. id ?? ''
237
+ const label = input . label_visible === false ? initialLabel : { translate : 'options.generic_value' , with : [ input . label ?? '' , initialLabel ] }
236
238
return < Button label = { label } width = { input . width ?? 200 } />
237
239
}
238
240
You can’t perform that action at this time.
0 commit comments