Skip to content

Commit 258b36b

Browse files
author
vakrilov
committed
Skip iterating children that are not visible
1 parent 7c39e58 commit 258b36b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tns-core-modules/ui/proxy-view-container/proxy-view-container.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import types = require("utils/types");
2-
import {View} from "ui/core/view";
2+
import { View } from "ui/core/view";
33
import definition = require("ui/proxy-view-container");
44
import trace = require("trace");
5-
import {LayoutBase} from "ui/layouts/layout-base";
5+
import { LayoutBase } from "ui/layouts/layout-base";
66
/**
77
* Proxy view container that adds all its native children directly to the parent.
88
* To be used as a logical grouping container of views.
@@ -51,7 +51,9 @@ export class ProxyViewContainer extends LayoutBase implements definition.ProxyVi
5151

5252
public _eachLayoutView(callback: (View) => void): void {
5353
this._eachChildView((cv) => {
54-
cv._eachLayoutView(callback);
54+
if (cv._isVisible) {
55+
cv._eachLayoutView(callback);
56+
}
5557
return true;
5658
});
5759
}

0 commit comments

Comments
 (0)