File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
src/packages/language/workspace/language Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ export class UmbLanguageWorkspaceContext
33
33
{
34
34
path : 'create' ,
35
35
component : UmbLanguageWorkspaceEditorElement ,
36
- setup : async ( ) => {
36
+ setup : async ( _component , info ) => {
37
+ this . _setActivePathSegment ( info . match . fragments . consumed ) ;
37
38
this . create ( { parent : { entityType : UMB_LANGUAGE_ROOT_ENTITY_TYPE , unique : null } } ) ;
38
39
39
40
new UmbWorkspaceIsNewRedirectController (
@@ -49,19 +50,12 @@ export class UmbLanguageWorkspaceContext
49
50
setup : ( _component , info ) => {
50
51
this . removeUmbControllerByAlias ( 'isNewRedirectController' ) ;
51
52
this . load ( info . match . params . unique ) ;
53
+ this . _setActivePathSegment ( info . match . fragments . consumed ) ;
52
54
} ,
53
55
} ,
54
56
] ) ;
55
57
}
56
58
57
- protected override _checkWillNavigateAway ( newUrl : string ) : boolean {
58
- if ( this . getIsNew ( ) ) {
59
- return ! newUrl . includes ( `/create` ) || super . _checkWillNavigateAway ( newUrl ) ;
60
- } else {
61
- return ! newUrl . includes ( `/edit/${ this . getUnique ( ) } ` ) || super . _checkWillNavigateAway ( newUrl ) ;
62
- }
63
- }
64
-
65
59
setName ( name : string ) {
66
60
this . _data . updateCurrentData ( { name } ) ;
67
61
}
You can’t perform that action at this time.
0 commit comments