@@ -54,18 +54,14 @@ export class UmbPropertyEditorUIBlockListElement
54
54
#contentDataPathTranslator?: UmbBlockElementDataValidationPathTranslator ;
55
55
#settingsDataPathTranslator?: UmbBlockElementDataValidationPathTranslator ;
56
56
57
- //#catalogueModal: UmbModalRouteRegistrationController<typeof UMB_BLOCK_CATALOGUE_MODAL.DATA, undefined>;
58
-
59
- private _value : UmbBlockListValueModel | undefined = undefined ;
60
-
61
57
#lastValue: UmbBlockListValueModel | undefined = undefined ;
62
58
63
59
@property ( { attribute : false } )
64
60
public override set value ( value : UmbBlockListValueModel | undefined ) {
65
61
this . #lastValue = value ;
66
62
67
63
if ( ! value ) {
68
- this . _value = undefined ;
64
+ super . value = undefined ;
69
65
return ;
70
66
}
71
67
@@ -74,15 +70,15 @@ export class UmbPropertyEditorUIBlockListElement
74
70
buildUpValue . contentData ??= [ ] ;
75
71
buildUpValue . settingsData ??= [ ] ;
76
72
buildUpValue . expose ??= [ ] ;
77
- this . _value = buildUpValue as UmbBlockListValueModel ;
73
+ super . value = buildUpValue as UmbBlockListValueModel ;
78
74
79
- this . #managerContext. setLayouts ( this . _value . layout [ UMB_BLOCK_LIST_PROPERTY_EDITOR_SCHEMA_ALIAS ] ?? [ ] ) ;
80
- this . #managerContext. setContents ( this . _value . contentData ) ;
81
- this . #managerContext. setSettings ( this . _value . settingsData ) ;
82
- this . #managerContext. setExposes ( this . _value . expose ) ;
75
+ this . #managerContext. setLayouts ( super . value . layout [ UMB_BLOCK_LIST_PROPERTY_EDITOR_SCHEMA_ALIAS ] ?? [ ] ) ;
76
+ this . #managerContext. setContents ( super . value . contentData ) ;
77
+ this . #managerContext. setSettings ( super . value . settingsData ) ;
78
+ this . #managerContext. setExposes ( super . value . expose ) ;
83
79
}
84
80
public override get value ( ) : UmbBlockListValueModel | undefined {
85
- return this . _value ;
81
+ return super . value ;
86
82
}
87
83
88
84
@state ( )
@@ -214,10 +210,10 @@ export class UmbPropertyEditorUIBlockListElement
214
210
] ) . pipe ( debounceTime ( 20 ) ) ,
215
211
( [ layouts , contents , settings , exposes ] ) => {
216
212
if ( layouts . length === 0 ) {
217
- this . _value = undefined ;
213
+ super . value = undefined ;
218
214
} else {
219
- this . _value = {
220
- ...this . _value ,
215
+ super . value = {
216
+ ...super . value ,
221
217
layout : { [ UMB_BLOCK_LIST_PROPERTY_EDITOR_SCHEMA_ALIAS ] : layouts } ,
222
218
contentData : contents ,
223
219
settingsData : settings ,
@@ -227,11 +223,11 @@ export class UmbPropertyEditorUIBlockListElement
227
223
228
224
// If we don't have a value set from the outside or an internal value, we don't want to set the value.
229
225
// This is added to prevent the block list from setting an empty value on startup.
230
- if ( this . #lastValue === undefined && this . _value === undefined ) {
226
+ if ( this . #lastValue === undefined && super . value === undefined ) {
231
227
return ;
232
228
}
233
229
234
- context . setValue ( this . _value ) ;
230
+ context . setValue ( super . value ) ;
235
231
} ,
236
232
'motherObserver' ,
237
233
) ;
0 commit comments