@react-native-tvos/virtualized-lists 0.73.6-2 → 0.73.6-3

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.
@@ -1110,22 +1110,35 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
1110
1110
  registerAsNestedChild: this._registerAsNestedChild,
1111
1111
  unregisterAsNestedChild: this._unregisterAsNestedChild,
1112
1112
  }}>
1113
- <TVFocusGuideView
1114
- trapFocusLeft={
1115
- horizontalOrDefault(this.props.horizontal) &&
1116
- this.state.cellsAroundViewport.first > 0
1117
- }
1118
- trapFocusRight={
1119
- horizontalOrDefault(this.props.horizontal) && this._hasMore
1120
- }
1121
- trapFocusUp={
1122
- !horizontalOrDefault(this.props.horizontal) &&
1123
- this.state.cellsAroundViewport.first > 0
1124
- }
1125
- trapFocusDown={
1126
- !horizontalOrDefault(this.props.horizontal) && this._hasMore
1127
- }>
1128
- {React.cloneElement(
1113
+ {Platform.isTV ? (
1114
+ <TVFocusGuideView
1115
+ trapFocusLeft={
1116
+ horizontalOrDefault(this.props.horizontal) &&
1117
+ this.state.cellsAroundViewport.first > 0
1118
+ }
1119
+ trapFocusRight={
1120
+ horizontalOrDefault(this.props.horizontal) && this._hasMore
1121
+ }
1122
+ trapFocusUp={
1123
+ !horizontalOrDefault(this.props.horizontal) &&
1124
+ this.state.cellsAroundViewport.first > 0
1125
+ }
1126
+ trapFocusDown={
1127
+ !horizontalOrDefault(this.props.horizontal) && this._hasMore
1128
+ }>
1129
+ {React.cloneElement(
1130
+ (
1131
+ this.props.renderScrollComponent ||
1132
+ this._defaultRenderScrollComponent
1133
+ )(scrollProps),
1134
+ {
1135
+ ref: this._captureScrollRef,
1136
+ },
1137
+ cells,
1138
+ )}
1139
+ </TVFocusGuideView>
1140
+ ) : (
1141
+ React.cloneElement(
1129
1142
  (
1130
1143
  this.props.renderScrollComponent ||
1131
1144
  this._defaultRenderScrollComponent
@@ -1134,8 +1147,8 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
1134
1147
  ref: this._captureScrollRef,
1135
1148
  },
1136
1149
  cells,
1137
- )}
1138
- </TVFocusGuideView>
1150
+ )
1151
+ )}
1139
1152
  </VirtualizedListContextProvider>
1140
1153
  );
1141
1154
  let ret: React.Node = innerRet;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-tvos/virtualized-lists",
3
- "version": "0.73.6-2",
3
+ "version": "0.73.6-3",
4
4
  "description": "Virtualized lists for React Native with TV focus engine support.",
5
5
  "license": "MIT",
6
6
  "repository": {