File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,6 @@ export class UmbBlockTypeWorkspaceContext<BlockTypeData extends UmbBlockTypeWith
30
30
readonly name = this . #data. asObservablePart ( ( ) => 'block' ) ;
31
31
readonly unique = this . #data. asObservablePart ( ( data ) => data ?. contentElementTypeKey ) ;
32
32
33
- #properties = new UmbArrayState < PropertyEditorSettingsProperty > ( [ ] , ( x ) => x . alias ) ;
34
- readonly properties = this . #properties. asObservable ( ) ;
35
-
36
33
constructor ( host : UmbControllerHost , args : { manifest : ManifestWorkspace } ) {
37
34
super ( host , args . manifest . alias ) ;
38
35
const manifest = args . manifest ;
@@ -73,7 +70,7 @@ export class UmbBlockTypeWorkspaceContext<BlockTypeData extends UmbBlockTypeWith
73
70
protected override resetState ( ) {
74
71
super . resetState ( ) ;
75
72
this . #data. setValue ( undefined ) ;
76
- this . #properties . setValue ( [ ] ) ;
73
+ this . removeUmbControllerByAlias ( 'isNewRedirectController' ) ;
77
74
}
78
75
79
76
createPropertyDatasetContext ( host : UmbControllerHost ) : UmbPropertyDatasetContext {
@@ -168,7 +165,6 @@ export class UmbBlockTypeWorkspaceContext<BlockTypeData extends UmbBlockTypeWith
168
165
169
166
public override destroy ( ) : void {
170
167
this . #data. destroy ( ) ;
171
- this . #properties. destroy ( ) ;
172
168
super . destroy ( ) ;
173
169
}
174
170
}
Original file line number Diff line number Diff line change @@ -112,13 +112,24 @@ export class UmbBlockWorkspaceContext<LayoutDataType extends UmbBlockLayoutBaseM
112
112
] ) ;
113
113
}
114
114
115
+ protected override resetState ( ) {
116
+ super . resetState ( ) ;
117
+ this . #label. setValue ( undefined ) ;
118
+ this . #layout. setValue ( undefined ) ;
119
+ this . #initialLayout = undefined ;
120
+ this . #initialContent = undefined ;
121
+ this . #initialSettings = undefined ;
122
+ this . content . reset ( ) ;
123
+ this . settings . reset ( ) ;
124
+ this . removeUmbControllerByAlias ( 'isNewRedirectController' ) ;
125
+ }
126
+
115
127
async load ( unique : string ) {
116
128
await this . #retrieveBlockManager;
117
129
await this . #retrieveBlockEntries;
118
130
await this . #editorConfigPromise;
119
131
if ( ! this . #blockManager || ! this . #blockEntries) {
120
132
throw new Error ( 'Block manager not found' ) ;
121
- return ;
122
133
}
123
134
124
135
this . observe (
You can’t perform that action at this time.
0 commit comments