forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecyclerlistview+4.2.1.patch
45 lines (45 loc) · 2.99 KB
/
recyclerlistview+4.2.1.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff --git a/node_modules/recyclerlistview/dist/reactnative/core/RecyclerListView.js b/node_modules/recyclerlistview/dist/reactnative/core/RecyclerListView.js
index 3ca4550..753c2f7 100644
--- a/node_modules/recyclerlistview/dist/reactnative/core/RecyclerListView.js
+++ b/node_modules/recyclerlistview/dist/reactnative/core/RecyclerListView.js
@@ -251,6 +251,7 @@ var RecyclerListView = /** @class */ (function (_super) {
this._virtualRenderer.setOptimizeForAnimations(false);
};
RecyclerListView.prototype.componentDidMount = function () {
+ this._isMounted = true;
if (this._initComplete) {
this._processInitialOffset();
this._processOnEndReached();
diff --git a/node_modules/recyclerlistview/dist/reactnative/platform/reactnative/scrollcomponent/ScrollComponent.js b/node_modules/recyclerlistview/dist/reactnative/platform/reactnative/scrollcomponent/ScrollComponent.js
index 18c5ae2..4ca00f2 100644
--- a/node_modules/recyclerlistview/dist/reactnative/platform/reactnative/scrollcomponent/ScrollComponent.js
+++ b/node_modules/recyclerlistview/dist/reactnative/platform/reactnative/scrollcomponent/ScrollComponent.js
@@ -49,12 +49,13 @@ var ScrollComponent = /** @class */ (function (_super) {
}
};
_this._onLayout = function (event) {
- if (_this._height !== event.nativeEvent.layout.height || _this._width !== event.nativeEvent.layout.width) {
- _this._height = event.nativeEvent.layout.height;
+ const estimatedHeightSize = _this.props.estimatedHeightSize || event.nativeEvent.layout.height;
+ if (_this._height !== estimatedHeightSize || _this._width !== event.nativeEvent.layout.width) {
+ _this._height = estimatedHeightSize;
_this._width = event.nativeEvent.layout.width;
if (_this.props.onSizeChanged) {
_this._isSizeChangedCalledOnce = true;
- _this.props.onSizeChanged(event.nativeEvent.layout);
+ _this.props.onSizeChanged(__assign(__assign({}, event.nativeEvent.layout), { height: estimatedHeightSize }));
}
}
if (_this.props.onLayout) {
diff --git a/node_modules/recyclerlistview/src/core/scrollcomponent/BaseScrollComponent.tsx b/node_modules/recyclerlistview/src/core/scrollcomponent/BaseScrollComponent.tsx
index ee2952a..fc4326a 100644
--- a/node_modules/recyclerlistview/src/core/scrollcomponent/BaseScrollComponent.tsx
+++ b/node_modules/recyclerlistview/src/core/scrollcomponent/BaseScrollComponent.tsx
@@ -18,6 +18,7 @@ export interface ScrollComponentProps {
renderContentContainer?: (props?: object, children?: React.ReactNode) => React.ReactNode | null;
renderAheadOffset: number;
layoutSize?: Dimension;
+ estimatedHeightSize?: number;
}
export default abstract class BaseScrollComponent extends React.Component<ScrollComponentProps, {}> {
public abstract scrollTo(x: number, y: number, animate: boolean): void;