Skip to content

Commit 05260b7

Browse files
committed
fix(renderer): set templateParent for newly create DetachedText nodes
DetachedText is not inserted in the UI components tree, so we need to add it's parent manually.
1 parent ad48c69 commit 05260b7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: nativescript-angular/view-util.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@ export class ViewUtil {
4848
}
4949

5050
public insertChild(parent: any, child: NgView, atIndex: number = -1) {
51-
if (!parent || child.meta.skipAddToDom) {
51+
if (!parent) {
52+
return;
53+
}
54+
55+
if (child.meta.skipAddToDom) {
56+
child.templateParent = parent;
5257
return;
5358
}
5459

0 commit comments

Comments
 (0)