@react-native-tvos/virtualized-lists 0.76.1-1 → 0.76.3-0
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 +17 -7
- package/package.json +1 -1
package/Lists/VirtualizedList.js
CHANGED
|
@@ -1101,6 +1101,22 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
|
|
|
1101
1101
|
|
|
1102
1102
|
this._hasMore = this.state.cellsAroundViewport.last < itemCount - 1;
|
|
1103
1103
|
|
|
1104
|
+
const trapFocusHorizontal = I18nManager.isRTL
|
|
1105
|
+
? {
|
|
1106
|
+
trapFocusRight:
|
|
1107
|
+
horizontalOrDefault(this.props.horizontal) &&
|
|
1108
|
+
this.state.cellsAroundViewport.first > 0,
|
|
1109
|
+
trapFocusLeft:
|
|
1110
|
+
horizontalOrDefault(this.props.horizontal) && this._hasMore,
|
|
1111
|
+
}
|
|
1112
|
+
: {
|
|
1113
|
+
trapFocusLeft:
|
|
1114
|
+
horizontalOrDefault(this.props.horizontal) &&
|
|
1115
|
+
this.state.cellsAroundViewport.first > 0,
|
|
1116
|
+
trapFocusRight:
|
|
1117
|
+
horizontalOrDefault(this.props.horizontal) && this._hasMore,
|
|
1118
|
+
};
|
|
1119
|
+
|
|
1104
1120
|
const innerRet = (
|
|
1105
1121
|
<VirtualizedListContextProvider
|
|
1106
1122
|
value={{
|
|
@@ -1113,13 +1129,7 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
|
|
|
1113
1129
|
}}>
|
|
1114
1130
|
{Platform.isTV ? (
|
|
1115
1131
|
<TVFocusGuideView
|
|
1116
|
-
|
|
1117
|
-
horizontalOrDefault(this.props.horizontal) &&
|
|
1118
|
-
this.state.cellsAroundViewport.first > 0
|
|
1119
|
-
}
|
|
1120
|
-
trapFocusRight={
|
|
1121
|
-
horizontalOrDefault(this.props.horizontal) && this._hasMore
|
|
1122
|
-
}
|
|
1132
|
+
{...trapFocusHorizontal}
|
|
1123
1133
|
trapFocusUp={
|
|
1124
1134
|
!horizontalOrDefault(this.props.horizontal) &&
|
|
1125
1135
|
this.state.cellsAroundViewport.first > 0
|