@react-native-tvos/virtualized-lists 0.74.0-0rc2 → 0.74.1-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.
@@ -1111,22 +1111,35 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
1111
1111
  registerAsNestedChild: this._registerAsNestedChild,
1112
1112
  unregisterAsNestedChild: this._unregisterAsNestedChild,
1113
1113
  }}>
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(
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
- </TVFocusGuideView>
1151
+ )
1152
+ )}
1140
1153
  </VirtualizedListContextProvider>
1141
1154
  );
1142
1155
  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.74.0-0rc2",
3
+ "version": "0.74.1-0",
4
4
  "description": "Virtualized lists for React Native with TV focus engine support.",
5
5
  "license": "MIT",
6
6
  "repository": {