forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path@shopify+flash-list++recyclerlistview+4.2.0.patch
92 lines (90 loc) · 5.65 KB
/
@shopify+flash-list++recyclerlistview+4.2.0.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
diff --git a/node_modules/@shopify/flash-list/node_modules/recyclerlistview/dist/reactnative/core/RecyclerListView.js b/node_modules/@shopify/flash-list/node_modules/recyclerlistview/dist/reactnative/core/RecyclerListView.js
index a98072e..67b8f30 100644
--- a/node_modules/@shopify/flash-list/node_modules/recyclerlistview/dist/reactnative/core/RecyclerListView.js
+++ b/node_modules/@shopify/flash-list/node_modules/recyclerlistview/dist/reactnative/core/RecyclerListView.js
@@ -375,6 +375,12 @@ var RecyclerListView = /** @class */ (function (_super) {
}
return null;
};
+ RecyclerListView.prototype.getNativeScrollRef = function () {
+ if (this._scrollComponent && this._scrollComponent.getNativeScrollRef) {
+ return this._scrollComponent.getNativeScrollRef();
+ }
+ return null;
+ };
RecyclerListView.prototype.renderCompat = function () {
//TODO:Talha
// const {
diff --git a/node_modules/@shopify/flash-list/node_modules/recyclerlistview/dist/reactnative/core/scrollcomponent/BaseScrollComponent.js b/node_modules/@shopify/flash-list/node_modules/recyclerlistview/dist/reactnative/core/scrollcomponent/BaseScrollComponent.js
index 96355ba..4d32c92 100644
--- a/node_modules/@shopify/flash-list/node_modules/recyclerlistview/dist/reactnative/core/scrollcomponent/BaseScrollComponent.js
+++ b/node_modules/@shopify/flash-list/node_modules/recyclerlistview/dist/reactnative/core/scrollcomponent/BaseScrollComponent.js
@@ -23,6 +23,9 @@ var BaseScrollComponent = /** @class */ (function (_super) {
BaseScrollComponent.prototype.getScrollableNode = function () {
return null;
};
+ BaseScrollComponent.prototype.getNativeScrollRef = function () {
+ return null;
+ };
return BaseScrollComponent;
}(React.Component));
exports.default = BaseScrollComponent;
diff --git a/node_modules/@shopify/flash-list/node_modules/recyclerlistview/dist/reactnative/platform/reactnative/scrollcomponent/ScrollComponent.js b/node_modules/@shopify/flash-list/node_modules/recyclerlistview/dist/reactnative/platform/reactnative/scrollcomponent/ScrollComponent.js
index 2f7033c..a559e18 100644
--- a/node_modules/@shopify/flash-list/node_modules/recyclerlistview/dist/reactnative/platform/reactnative/scrollcomponent/ScrollComponent.js
+++ b/node_modules/@shopify/flash-list/node_modules/recyclerlistview/dist/reactnative/platform/reactnative/scrollcomponent/ScrollComponent.js
@@ -76,6 +76,9 @@ var ScrollComponent = /** @class */ (function (_super) {
}
return null;
};
+ ScrollComponent.prototype.getNativeScrollRef = function () {
+ return this._scrollViewRef;
+ };
ScrollComponent.prototype.render = function () {
var Scroller = TSCast_1.default.cast(this.props.externalScrollView); //TSI
var renderContentContainer = this.props.renderContentContainer ? this.props.renderContentContainer : this._defaultContainer;
diff --git a/node_modules/@shopify/flash-list/node_modules/recyclerlistview/src/core/RecyclerListView.tsx b/node_modules/@shopify/flash-list/node_modules/recyclerlistview/src/core/RecyclerListView.tsx
index 95dd87b..03de7ed 100644
--- a/node_modules/@shopify/flash-list/node_modules/recyclerlistview/src/core/RecyclerListView.tsx
+++ b/node_modules/@shopify/flash-list/node_modules/recyclerlistview/src/core/RecyclerListView.tsx
@@ -394,6 +394,13 @@ export default class RecyclerListView<P extends RecyclerListViewProps, S extends
return null;
}
+ public getNativeScrollRef(): unknown | null {
+ if (this._scrollComponent && this._scrollComponent.getNativeScrollRef) {
+ return this._scrollComponent.getNativeScrollRef();
+ }
+ return null;
+ }
+
public renderCompat(): JSX.Element {
//TODO:Talha
// const {
diff --git a/node_modules/@shopify/flash-list/node_modules/recyclerlistview/src/core/scrollcomponent/BaseScrollComponent.tsx b/node_modules/@shopify/flash-list/node_modules/recyclerlistview/src/core/scrollcomponent/BaseScrollComponent.tsx
index 2b6024c..f04b0f2 100644
--- a/node_modules/@shopify/flash-list/node_modules/recyclerlistview/src/core/scrollcomponent/BaseScrollComponent.tsx
+++ b/node_modules/@shopify/flash-list/node_modules/recyclerlistview/src/core/scrollcomponent/BaseScrollComponent.tsx
@@ -25,4 +25,9 @@ export default abstract class BaseScrollComponent extends React.Component<Scroll
public getScrollableNode(): number | null {
return null;
}
+
+ //Override and return ref to your custom scrollview. Useful if you need to use Animated Events on the new architecture.
+ public getNativeScrollRef(): unknown | null {
+ return null;
+ }
}
diff --git a/node_modules/@shopify/flash-list/node_modules/recyclerlistview/src/platform/reactnative/scrollcomponent/ScrollComponent.tsx b/node_modules/@shopify/flash-list/node_modules/recyclerlistview/src/platform/reactnative/scrollcomponent/ScrollComponent.tsx
index 0d0dedc..0d81ecc 100644
--- a/node_modules/@shopify/flash-list/node_modules/recyclerlistview/src/platform/reactnative/scrollcomponent/ScrollComponent.tsx
+++ b/node_modules/@shopify/flash-list/node_modules/recyclerlistview/src/platform/reactnative/scrollcomponent/ScrollComponent.tsx
@@ -50,6 +50,10 @@ export default class ScrollComponent extends BaseScrollComponent {
return null;
}
+ public getNativeScrollRef(): unknown | null {
+ return this._scrollViewRef;
+ }
+
public render(): JSX.Element {
const Scroller = TSCast.cast<ScrollView>(this.props.externalScrollView); //TSI
const renderContentContainer = this.props.renderContentContainer ? this.props.renderContentContainer : this._defaultContainer;