@react-native-tvos/virtualized-lists 0.74.0-0rc2 → 0.74.0-0rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Lists/VirtualizedList.js +31 -18
- package/package.json +1 -1
package/Lists/VirtualizedList.js
CHANGED
|
@@ -1111,22 +1111,35 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
|
|
|
1111
1111
|
registerAsNestedChild: this._registerAsNestedChild,
|
|
1112
1112
|
unregisterAsNestedChild: this._unregisterAsNestedChild,
|
|
1113
1113
|
}}>
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1114
|
+
{Platform.isTV ? (
|
|
1115
|
+
<TVFocusGuideView
|
|
1116
|
+
trapFocusLeft={
|
|
1117
|
+
horizontalOrDefault(this.props.horizontal) &&
|
|
1118
|
+
this.state.cellsAroundViewport.first > 0
|
|
1119
|
+
}
|
|
1120
|
+
trapFocusRight={
|
|
1121
|
+
horizontalOrDefault(this.props.horizontal) && this._hasMore
|
|
1122
|
+
}
|
|
1123
|
+
trapFocusUp={
|
|
1124
|
+
!horizontalOrDefault(this.props.horizontal) &&
|
|
1125
|
+
this.state.cellsAroundViewport.first > 0
|
|
1126
|
+
}
|
|
1127
|
+
trapFocusDown={
|
|
1128
|
+
!horizontalOrDefault(this.props.horizontal) && this._hasMore
|
|
1129
|
+
}>
|
|
1130
|
+
{React.cloneElement(
|
|
1131
|
+
(
|
|
1132
|
+
this.props.renderScrollComponent ||
|
|
1133
|
+
this._defaultRenderScrollComponent
|
|
1134
|
+
)(scrollProps),
|
|
1135
|
+
{
|
|
1136
|
+
ref: this._captureScrollRef,
|
|
1137
|
+
},
|
|
1138
|
+
cells,
|
|
1139
|
+
)}
|
|
1140
|
+
</TVFocusGuideView>
|
|
1141
|
+
) : (
|
|
1142
|
+
React.cloneElement(
|
|
1130
1143
|
(
|
|
1131
1144
|
this.props.renderScrollComponent ||
|
|
1132
1145
|
this._defaultRenderScrollComponent
|
|
@@ -1135,8 +1148,8 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
|
|
|
1135
1148
|
ref: this._captureScrollRef,
|
|
1136
1149
|
},
|
|
1137
1150
|
cells,
|
|
1138
|
-
)
|
|
1139
|
-
|
|
1151
|
+
)
|
|
1152
|
+
)}
|
|
1140
1153
|
</VirtualizedListContextProvider>
|
|
1141
1154
|
);
|
|
1142
1155
|
let ret: React.Node = innerRet;
|