Skip to content

Commit 345f64b

Browse files
committed
fix: support N Akylas fork layout improvements
1 parent 0b44c79 commit 345f64b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/collectionview-common.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,19 @@ declare module '@nativescript/core/ui/core/view-base' {
4444
}
4545

4646
ViewBase.prototype._recursiveSuspendNativeUpdates = profile('_recursiveSuspendNativeUpdates', function (type) {
47+
// we can suspendRequestLayout as it will be handled outside and after
48+
this['suspendRequestLayout'] = true;
4749
this._suspendNativeUpdates(type);
48-
this.eachChild((c) => c._recursiveSuspendNativeUpdates(type));
50+
if (!(this instanceof CollectionViewBase)) {
51+
this.eachChild((c) => c._recursiveSuspendNativeUpdates(type));
52+
}
4953
});
5054
ViewBase.prototype._recursiveResumeNativeUpdates = profile('_recursiveResumeNativeUpdates', function (type) {
5155
this._resumeNativeUpdates(type);
52-
this.eachChild((c) => c._recursiveResumeNativeUpdates(type));
56+
if (!(this instanceof CollectionViewBase)) {
57+
this.eachChild((c) => c._recursiveResumeNativeUpdates(type));
58+
}
59+
this['suspendRequestLayout'] = false;
5360
});
5461

5562
// right now _recursiveBatchUpdates suppose no view is added in the callback. If so it will crash from _resumeNativeUpdates

0 commit comments

Comments
 (0)