File tree 1 file changed +11
-4
lines changed
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,8 @@ export class ViewNode {
123
123
} else {
124
124
parentLayout . addChild ( this . nativeView ) ;
125
125
}
126
+ } else if ( this . parentNativeView instanceof ContentView ) {
127
+ ( < ContentView > this . parentNativeView ) . content = this . nativeView ;
126
128
} else if ( ( < any > this . parentNativeView ) . _addChildFromBuilder ) {
127
129
( < any > this . parentNativeView ) . _addChildFromBuilder ( this . viewName , this . nativeView ) ;
128
130
} else if ( this . parentNode . isComplexProperty ) {
@@ -334,10 +336,15 @@ export class ViewNode {
334
336
this . detachUIEvents ( ) ;
335
337
if ( this . nativeView ) {
336
338
let nativeParent = this . nativeView . parent ;
337
- if ( nativeParent instanceof LayoutBase ) {
338
- ( < LayoutBase > nativeParent ) . removeChild ( this . nativeView ) ;
339
- } else {
340
- nativeParent . _removeView ( this . nativeView ) ;
339
+ if ( nativeParent ) {
340
+ if ( nativeParent instanceof LayoutBase ) {
341
+ ( < LayoutBase > nativeParent ) . removeChild ( this . nativeView ) ;
342
+ } else if ( nativeParent instanceof ContentView ) {
343
+ ( < ContentView > nativeParent ) . content = undefined ;
344
+ }
345
+ else {
346
+ nativeParent . _removeView ( this . nativeView ) ;
347
+ }
341
348
}
342
349
}
343
350
You can’t perform that action at this time.
0 commit comments