@@ -329,75 +329,78 @@ const CustomObjectPropertiesEditor = (props: Props) => {
329
329
project = { project }
330
330
resourceManagementProps = { resourceManagementProps }
331
331
/>
332
- < Line >
333
- < Column expand noMargin >
334
- < Text size = "block-title" > Variant</ Text >
335
- </ Column >
336
- </ Line >
337
- < ColumnStackLayout expand noMargin >
338
- < LineStackLayout >
339
- < FlatButton
340
- label = { < Trans > Edit</ Trans > }
341
- leftIcon = { < Edit /> }
342
- onClick = { editVariant }
343
- disabled = {
344
- ! eventBasedObject ||
345
- getVariant (
332
+ { ! customObjectConfiguration . isForcedToOverrideEventsBasedObjectChildrenConfiguration ( ) && (
333
+ < >
334
+ < Line >
335
+ < Column expand noMargin >
336
+ < Text size = "block-title" > Variant</ Text >
337
+ </ Column >
338
+ </ Line >
339
+ < ColumnStackLayout expand noMargin >
340
+ < LineStackLayout >
341
+ < FlatButton
342
+ label = { < Trans > Edit</ Trans > }
343
+ leftIcon = { < Edit /> }
344
+ onClick = { editVariant }
345
+ disabled = {
346
+ ! eventBasedObject ||
347
+ getVariant (
348
+ eventBasedObject ,
349
+ customObjectConfiguration
350
+ ) . getAssetStoreAssetId ( ) !== ''
351
+ }
352
+ />
353
+ < FlatButton
354
+ label = { < Trans > Duplicate</ Trans > }
355
+ leftIcon = { < Add /> }
356
+ onClick = { ( ) => setNewVariantDialogOpen ( true ) }
357
+ />
358
+ < FlatButton
359
+ label = { < Trans > Delete</ Trans > }
360
+ leftIcon = { < Trash /> }
361
+ onClick = { deleteVariant }
362
+ />
363
+ </ LineStackLayout >
364
+ < SelectField
365
+ floatingLabelText = { < Trans > Variant</ Trans > }
366
+ value = { getVariantName (
346
367
eventBasedObject ,
347
368
customObjectConfiguration
348
- ) . getAssetStoreAssetId ( ) !== ''
349
- }
350
- />
351
- < FlatButton
352
- label = { < Trans > Duplicate</ Trans > }
353
- leftIcon = { < Add /> }
354
- onClick = { ( ) => setNewVariantDialogOpen ( true ) }
355
- />
356
- < FlatButton
357
- label = { < Trans > Delete</ Trans > }
358
- leftIcon = { < Trash /> }
359
- onClick = { deleteVariant }
360
- />
361
- </ LineStackLayout >
362
- < SelectField
363
- floatingLabelText = { < Trans > Variant</ Trans > }
364
- value = { getVariantName (
365
- eventBasedObject ,
366
- customObjectConfiguration
367
- ) }
368
- onChange = { ( e , i , value : string ) => {
369
- customObjectConfiguration . setVariantName ( value ) ;
370
- forceUpdate ( ) ;
371
- } }
372
- >
373
- < SelectOption
374
- key = "default-variant"
375
- value = ""
376
- label = { t `Default` }
377
- />
378
- { eventBasedObject &&
379
- mapFor (
380
- 0 ,
381
- eventBasedObject . getVariants ( ) . getVariantsCount ( ) ,
382
- i => {
383
- if ( ! eventBasedObject ) {
384
- return null ;
385
- }
386
- const variant = eventBasedObject
387
- . getVariants ( )
388
- . getVariantAt ( i ) ;
389
- return (
390
- < SelectOption
391
- key = { 'variant-' + variant . getName ( ) }
392
- value = { variant . getName ( ) }
393
- label = { variant . getName ( ) }
394
- />
395
- ) ;
396
- }
397
- ) }
398
- </ SelectField >
399
- </ ColumnStackLayout >
400
-
369
+ ) }
370
+ onChange = { ( e , i , value : string ) => {
371
+ customObjectConfiguration . setVariantName ( value ) ;
372
+ forceUpdate ( ) ;
373
+ } }
374
+ >
375
+ < SelectOption
376
+ key = "default-variant"
377
+ value = ""
378
+ label = { t `Default` }
379
+ />
380
+ { eventBasedObject &&
381
+ mapFor (
382
+ 0 ,
383
+ eventBasedObject . getVariants ( ) . getVariantsCount ( ) ,
384
+ i => {
385
+ if ( ! eventBasedObject ) {
386
+ return null ;
387
+ }
388
+ const variant = eventBasedObject
389
+ . getVariants ( )
390
+ . getVariantAt ( i ) ;
391
+ return (
392
+ < SelectOption
393
+ key = { 'variant-' + variant . getName ( ) }
394
+ value = { variant . getName ( ) }
395
+ label = { variant . getName ( ) }
396
+ />
397
+ ) ;
398
+ }
399
+ ) }
400
+ </ SelectField >
401
+ </ ColumnStackLayout >
402
+ </ >
403
+ ) }
401
404
{ ! getVariantName (
402
405
eventBasedObject ,
403
406
customObjectConfiguration
0 commit comments