@office-iss/react-native-win32 0.70.2 → 0.71.0-preview.1

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.
Files changed (559) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc.js +2 -0
  3. package/.flowconfig +3 -6
  4. package/CHANGELOG.json +281 -43
  5. package/CHANGELOG.md +105 -24
  6. package/IntegrationTests/AccessibilityManagerTest.js +1 -1
  7. package/IntegrationTests/AppEventsTest.js +0 -1
  8. package/IntegrationTests/BUCK +0 -1
  9. package/IntegrationTests/GlobalEvalWithSourceUrlTest.js +1 -1
  10. package/IntegrationTests/ImageSnapshotTest.js +1 -1
  11. package/IntegrationTests/IntegrationTestsApp.js +2 -3
  12. package/IntegrationTests/SimpleSnapshotTest.js +1 -1
  13. package/IntegrationTests/SyncMethodTest.js +1 -1
  14. package/IntegrationTests/TimersTest.js +4 -4
  15. package/IntegrationTests/WebSocketTest.js +3 -3
  16. package/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +80 -0
  17. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +4 -3
  18. package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +1 -0
  19. package/Libraries/Alert/Alert.d.ts +90 -0
  20. package/Libraries/Alert/Alert.js +7 -1
  21. package/Libraries/Alert/Alert.win32.js +1 -0
  22. package/Libraries/Alert/NativeAlertManager.js +2 -0
  23. package/Libraries/Alert/RCTAlertManager.ios.js +2 -1
  24. package/Libraries/Animated/Animated.d.ts +587 -0
  25. package/Libraries/Animated/Animated.js +13 -11
  26. package/Libraries/Animated/AnimatedEvent.js +12 -17
  27. package/Libraries/Animated/AnimatedImplementation.js +21 -23
  28. package/Libraries/Animated/AnimatedMock.js +11 -13
  29. package/Libraries/Animated/AnimatedWeb.js +2 -2
  30. package/Libraries/Animated/Easing.d.ts +37 -0
  31. package/Libraries/Animated/Easing.js +2 -2
  32. package/Libraries/Animated/NativeAnimatedHelper.js +32 -22
  33. package/Libraries/Animated/NativeAnimatedModule.js +1 -0
  34. package/Libraries/Animated/NativeAnimatedTurboModule.js +1 -0
  35. package/Libraries/Animated/SpringConfig.js +2 -7
  36. package/Libraries/Animated/animations/Animation.js +3 -4
  37. package/Libraries/Animated/animations/DecayAnimation.js +5 -8
  38. package/Libraries/Animated/animations/SpringAnimation.js +9 -14
  39. package/Libraries/Animated/animations/TimingAnimation.js +9 -13
  40. package/Libraries/Animated/bezier.js +2 -2
  41. package/Libraries/Animated/components/AnimatedFlatList.js +5 -6
  42. package/Libraries/Animated/components/AnimatedImage.js +5 -6
  43. package/Libraries/Animated/components/AnimatedScrollView.js +110 -14
  44. package/Libraries/Animated/components/AnimatedSectionList.js +4 -5
  45. package/Libraries/Animated/components/AnimatedText.js +5 -6
  46. package/Libraries/Animated/components/AnimatedView.js +5 -6
  47. package/Libraries/Animated/createAnimatedComponent.js +13 -20
  48. package/Libraries/Animated/createAnimatedComponent_EXPERIMENTAL.js +2 -2
  49. package/Libraries/Animated/nodes/AnimatedAddition.js +6 -8
  50. package/Libraries/Animated/nodes/AnimatedColor.js +7 -7
  51. package/Libraries/Animated/nodes/AnimatedDiffClamp.js +6 -8
  52. package/Libraries/Animated/nodes/AnimatedDivision.js +7 -9
  53. package/Libraries/Animated/nodes/AnimatedInterpolation.js +7 -10
  54. package/Libraries/Animated/nodes/AnimatedModulo.js +6 -8
  55. package/Libraries/Animated/nodes/AnimatedMultiplication.js +7 -9
  56. package/Libraries/Animated/nodes/AnimatedNode.js +10 -8
  57. package/Libraries/Animated/nodes/AnimatedProps.js +12 -30
  58. package/Libraries/Animated/nodes/AnimatedStyle.js +12 -22
  59. package/Libraries/Animated/nodes/AnimatedSubtraction.js +7 -9
  60. package/Libraries/Animated/nodes/AnimatedTracking.js +8 -12
  61. package/Libraries/Animated/nodes/AnimatedTransform.js +38 -31
  62. package/Libraries/Animated/nodes/AnimatedValue.js +9 -10
  63. package/Libraries/Animated/nodes/AnimatedValueXY.js +4 -7
  64. package/Libraries/Animated/nodes/AnimatedWithChildren.js +4 -5
  65. package/Libraries/Animated/useAnimatedProps.js +8 -16
  66. package/Libraries/Animated/useAnimatedValue.d.ts +15 -0
  67. package/Libraries/Animated/useAnimatedValue.js +25 -0
  68. package/Libraries/AppState/AppState.d.ts +58 -0
  69. package/Libraries/AppState/AppState.js +3 -7
  70. package/Libraries/AppState/NativeAppState.js +1 -0
  71. package/Libraries/BatchedBridge/MessageQueue.js +9 -5
  72. package/Libraries/BatchedBridge/NativeModules.d.ts +25 -0
  73. package/Libraries/BatchedBridge/NativeModules.js +1 -0
  74. package/Libraries/Blob/BlobManager.js +5 -3
  75. package/Libraries/Blob/File.js +2 -3
  76. package/Libraries/Blob/FileReader.js +6 -5
  77. package/Libraries/Blob/NativeBlobModule.js +1 -0
  78. package/Libraries/Blob/NativeFileReaderModule.js +1 -0
  79. package/Libraries/Blob/URL.js +11 -9
  80. package/Libraries/BugReporting/NativeBugReporting.js +1 -0
  81. package/Libraries/BugReporting/getReactData.js +1 -1
  82. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +128 -0
  83. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.flow.js +208 -0
  84. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +40 -8
  85. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +40 -8
  86. package/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js +1 -0
  87. package/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js +5 -0
  88. package/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +86 -0
  89. package/Libraries/Components/ActivityIndicator/ActivityIndicator.flow.js +58 -0
  90. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +7 -8
  91. package/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js +2 -3
  92. package/Libraries/Components/Button.d.ts +42 -0
  93. package/Libraries/Components/Button.flow.js +265 -0
  94. package/Libraries/Components/Button.js +62 -18
  95. package/Libraries/Components/Clipboard/Clipboard.d.ts +28 -0
  96. package/Libraries/Components/Clipboard/NativeClipboard.js +1 -0
  97. package/Libraries/Components/DatePicker/DatePickerIOS.android.js +4 -2
  98. package/Libraries/Components/DatePicker/DatePickerIOS.d.ts +92 -0
  99. package/Libraries/Components/{MaskedView/MaskedViewIOS.android.js → DatePicker/DatePickerIOS.flow.android.js} +3 -2
  100. package/Libraries/Components/DatePicker/DatePickerIOS.flow.ios.js +113 -0
  101. package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +8 -7
  102. package/Libraries/Components/DatePicker/DatePickerIOS.win32.js +4 -2
  103. package/Libraries/Components/DatePicker/RCTDatePickerNativeComponent.js +7 -6
  104. package/Libraries/Components/DatePickerAndroid/NativeDatePickerAndroid.js +1 -0
  105. package/Libraries/Components/DrawerAndroid/AndroidDrawerLayoutNativeComponent.js +9 -8
  106. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +13 -14
  107. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +141 -0
  108. package/Libraries/Components/Keyboard/Keyboard.d.ts +109 -0
  109. package/Libraries/Components/Keyboard/Keyboard.js +35 -8
  110. package/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +46 -0
  111. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +35 -15
  112. package/Libraries/Components/Keyboard/NativeKeyboardObserver.js +1 -0
  113. package/Libraries/Components/Pressable/Pressable.d.ts +167 -0
  114. package/Libraries/Components/Pressable/Pressable.js +73 -15
  115. package/Libraries/Components/Pressable/Pressable.win32.js +77 -19
  116. package/Libraries/Components/Pressable/useAndroidRippleForView.js +6 -3
  117. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +3 -3
  118. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +83 -0
  119. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js +2 -2
  120. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.android.js +1 -1
  121. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.d.ts +62 -0
  122. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js +4 -4
  123. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.win32.js +1 -1
  124. package/Libraries/Components/ProgressViewIOS/RCTProgressViewNativeComponent.js +2 -2
  125. package/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js +5 -6
  126. package/Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js +4 -4
  127. package/Libraries/Components/RefreshControl/RefreshControl.d.ts +87 -0
  128. package/Libraries/Components/RefreshControl/RefreshControl.js +4 -3
  129. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +2 -3
  130. package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +1 -1
  131. package/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +24 -0
  132. package/Libraries/Components/SafeAreaView/SafeAreaView.flow.js +19 -0
  133. package/Libraries/Components/SafeAreaView/SafeAreaView.js +5 -4
  134. package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +5 -4
  135. package/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js +2 -1
  136. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +2 -1
  137. package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +2 -1
  138. package/Libraries/Components/ScrollView/ScrollView.d.ts +911 -0
  139. package/Libraries/Components/ScrollView/ScrollView.js +87 -52
  140. package/Libraries/Components/ScrollView/ScrollViewCommands.js +3 -3
  141. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +2 -1
  142. package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +3 -3
  143. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +243 -269
  144. package/Libraries/Components/Slider/Slider.d.ts +132 -0
  145. package/Libraries/Components/Slider/Slider.js +9 -9
  146. package/Libraries/Components/Slider/SliderNativeComponent.js +4 -5
  147. package/Libraries/Components/Sound/NativeSoundManager.js +1 -0
  148. package/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid.js +1 -0
  149. package/Libraries/Components/StatusBar/NativeStatusBarManagerIOS.js +1 -0
  150. package/Libraries/Components/StatusBar/StatusBar.d.ts +138 -0
  151. package/Libraries/Components/StatusBar/StatusBar.js +7 -7
  152. package/Libraries/Components/Switch/AndroidSwitchNativeComponent.js +10 -10
  153. package/Libraries/Components/Switch/Switch.d.ts +115 -0
  154. package/Libraries/Components/Switch/Switch.js +7 -7
  155. package/Libraries/Components/Switch/SwitchNativeComponent.js +9 -4
  156. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +40 -12
  157. package/Libraries/Components/TextInput/InputAccessoryView.d.ts +34 -0
  158. package/Libraries/Components/TextInput/InputAccessoryView.js +3 -4
  159. package/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js +1 -1
  160. package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +3 -2
  161. package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +3 -2
  162. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +3 -1
  163. package/Libraries/Components/TextInput/TextInput.d.ts +840 -0
  164. package/Libraries/Components/TextInput/TextInput.flow.js +1057 -0
  165. package/Libraries/Components/TextInput/TextInput.js +344 -38
  166. package/Libraries/Components/TextInput/TextInput.win32.d.ts +1 -1
  167. package/Libraries/Components/TextInput/TextInput.win32.js +1 -1
  168. package/Libraries/Components/TextInput/TextInput.win32.js.map +1 -1
  169. package/Libraries/Components/TextInput/TextInputNativeCommands.js +2 -2
  170. package/Libraries/Components/TextInput/TextInputState.js +22 -5
  171. package/Libraries/Components/TextInput/TextInputState.win32.js +24 -5
  172. package/Libraries/Components/ToastAndroid/NativeToastAndroid.js +1 -0
  173. package/Libraries/Components/ToastAndroid/ToastAndroid.d.ts +47 -0
  174. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
  175. package/Libraries/Components/Touchable/Touchable.d.ts +90 -0
  176. package/Libraries/Components/Touchable/Touchable.flow.js +258 -0
  177. package/Libraries/Components/Touchable/Touchable.js +12 -12
  178. package/Libraries/Components/Touchable/Touchable.win32.js +12 -12
  179. package/Libraries/Components/Touchable/TouchableBounce.js +44 -10
  180. package/Libraries/Components/Touchable/TouchableHighlight.d.ts +68 -0
  181. package/Libraries/Components/Touchable/TouchableHighlight.js +32 -9
  182. package/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +114 -0
  183. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +54 -20
  184. package/Libraries/Components/Touchable/TouchableOpacity.d.ts +109 -0
  185. package/Libraries/Components/Touchable/TouchableOpacity.js +54 -16
  186. package/Libraries/Components/Touchable/TouchableWin32.Props.d.ts +2 -1
  187. package/Libraries/Components/Touchable/TouchableWin32.Props.js.map +1 -1
  188. package/Libraries/Components/Touchable/TouchableWin32.js +0 -1
  189. package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
  190. package/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +143 -0
  191. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +64 -10
  192. package/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js +1 -1
  193. package/Libraries/Components/UnimplementedViews/UnimplementedView.js +1 -1
  194. package/Libraries/Components/View/ReactNativeStyleAttributes.js +13 -2
  195. package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +1 -0
  196. package/Libraries/Components/View/View.d.ts +29 -0
  197. package/Libraries/Components/View/View.js +91 -8
  198. package/Libraries/Components/View/View.win32.js +176 -89
  199. package/Libraries/Components/View/ViewAccessibility.d.ts +360 -0
  200. package/Libraries/Components/View/ViewAccessibility.js +70 -1
  201. package/Libraries/Components/View/ViewNativeComponent.js +3 -3
  202. package/Libraries/Components/View/ViewPropTypes.d.ts +245 -0
  203. package/Libraries/Components/View/ViewPropTypes.js +105 -13
  204. package/Libraries/Components/View/ViewPropTypes.win32.js +105 -13
  205. package/Libraries/Components/View/ViewWin32.Props.d.ts +6 -1
  206. package/Libraries/Components/View/ViewWin32.Props.js.map +1 -1
  207. package/Libraries/Core/Devtools/openFileInEditor.js +3 -0
  208. package/Libraries/Core/Devtools/parseErrorStack.js +1 -1
  209. package/Libraries/Core/Devtools/symbolicateStackTrace.js +2 -2
  210. package/Libraries/Core/ExceptionsManager.js +8 -0
  211. package/Libraries/Core/ExtendedError.js +11 -8
  212. package/Libraries/Core/InitializeCore.js +2 -1
  213. package/Libraries/Core/NativeExceptionsManager.js +3 -4
  214. package/Libraries/Core/RawEventEmitter.js +2 -1
  215. package/Libraries/Core/ReactFiberErrorDialog.js +2 -2
  216. package/Libraries/Core/ReactNativeVersion.js +2 -2
  217. package/Libraries/Core/ReactNativeVersionCheck.js +1 -0
  218. package/Libraries/Core/ReactNativeVersionCheck.win32.js +1 -0
  219. package/Libraries/Core/SegmentFetcher/NativeSegmentFetcher.js +1 -0
  220. package/Libraries/Core/Timers/JSTimers.js +13 -11
  221. package/Libraries/Core/Timers/NativeTiming.js +1 -0
  222. package/Libraries/Core/setUpBatchedBridge.js +1 -5
  223. package/Libraries/Core/setUpDeveloperTools.js +4 -6
  224. package/Libraries/Core/setUpReactDevTools.js +4 -1
  225. package/Libraries/Core/setUpRegeneratorRuntime.js +1 -1
  226. package/Libraries/Core/setUpTimers.js +1 -1
  227. package/Libraries/EventEmitter/NativeEventEmitter.d.ts +70 -0
  228. package/Libraries/EventEmitter/NativeEventEmitter.js +1 -0
  229. package/Libraries/EventEmitter/RCTDeviceEventEmitter.d.ts +30 -0
  230. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +2 -1
  231. package/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +32 -0
  232. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +1 -0
  233. package/Libraries/Events/EventPolyfill.js +1 -1
  234. package/Libraries/HeapCapture/NativeJSCHeapCapture.js +1 -0
  235. package/Libraries/Image/AssetSourceResolver.js +4 -6
  236. package/Libraries/Image/Image.android.js +63 -45
  237. package/Libraries/Image/Image.d.ts +322 -0
  238. package/Libraries/Image/Image.flow.js +64 -0
  239. package/Libraries/Image/Image.ios.js +55 -28
  240. package/Libraries/Image/Image.win32.js +54 -25
  241. package/Libraries/Image/ImageBackground.js +18 -7
  242. package/Libraries/Image/ImageInjection.js +2 -1
  243. package/Libraries/Image/ImageProps.js +88 -5
  244. package/Libraries/Image/ImageResizeMode.d.ts +49 -0
  245. package/Libraries/Image/ImageSource.d.ts +76 -0
  246. package/Libraries/Image/ImageSourceUtils.js +80 -0
  247. package/Libraries/Image/ImageUtils.js +21 -0
  248. package/Libraries/Image/ImageViewNativeComponent.js +8 -5
  249. package/Libraries/Image/NativeImageEditor.js +1 -0
  250. package/Libraries/Image/NativeImageLoaderAndroid.js +1 -0
  251. package/Libraries/Image/NativeImageLoaderIOS.js +1 -0
  252. package/Libraries/Image/NativeImageLoaderWin32.js +1 -0
  253. package/Libraries/Image/NativeImageStoreAndroid.js +1 -0
  254. package/Libraries/Image/NativeImageStoreIOS.js +1 -0
  255. package/Libraries/Image/TextInlineImageNativeComponent.js +4 -3
  256. package/Libraries/Image/nativeImageSource.js +2 -2
  257. package/Libraries/Image/resolveAssetSource.js +5 -5
  258. package/Libraries/Inspector/BorderBox.js +1 -1
  259. package/Libraries/Inspector/BoxInspector.js +3 -4
  260. package/Libraries/Inspector/DevtoolsOverlay.js +213 -0
  261. package/Libraries/Inspector/ElementBox.js +4 -5
  262. package/Libraries/Inspector/ElementProperties.js +10 -11
  263. package/Libraries/Inspector/Inspector.js +22 -108
  264. package/Libraries/Inspector/Inspector.win32.js +23 -109
  265. package/Libraries/Inspector/InspectorOverlay.js +5 -5
  266. package/Libraries/Inspector/InspectorOverlay.win32.js +5 -5
  267. package/Libraries/Inspector/InspectorPanel.js +12 -10
  268. package/Libraries/Inspector/NetworkOverlay.js +7 -3
  269. package/Libraries/Inspector/PerformanceOverlay.js +3 -3
  270. package/Libraries/Inspector/StyleInspector.js +2 -2
  271. package/Libraries/Inspector/getInspectorDataForViewAtPoint.js +71 -0
  272. package/Libraries/Interaction/BridgeSpyStallHandler.js +1 -1
  273. package/Libraries/Interaction/InteractionManager.d.ts +74 -0
  274. package/Libraries/Interaction/InteractionManager.js +8 -8
  275. package/Libraries/Interaction/NativeFrameRateLogger.js +1 -0
  276. package/Libraries/Interaction/PanResponder.d.ts +202 -0
  277. package/Libraries/Interaction/PanResponder.flow.js +257 -0
  278. package/Libraries/Interaction/PanResponder.js +4 -3
  279. package/Libraries/JSInspector/JSInspector.js +0 -3
  280. package/Libraries/JSInspector/NetworkAgent.js +3 -3
  281. package/Libraries/LayoutAnimation/LayoutAnimation.d.ts +84 -0
  282. package/Libraries/LayoutAnimation/LayoutAnimation.js +4 -3
  283. package/Libraries/Linking/Linking.d.ts +61 -0
  284. package/Libraries/Linking/Linking.js +3 -2
  285. package/Libraries/Linking/NativeIntentAndroid.js +1 -0
  286. package/Libraries/Linking/NativeLinkingManager.js +1 -0
  287. package/Libraries/Lists/CellRenderMask.js +13 -3
  288. package/Libraries/Lists/ChildListCollection.js +72 -0
  289. package/Libraries/Lists/FillRateHelper.js +28 -17
  290. package/Libraries/Lists/FlatList.d.ts +292 -0
  291. package/Libraries/Lists/FlatList.js +70 -70
  292. package/Libraries/Lists/SectionList.d.ts +300 -0
  293. package/Libraries/Lists/SectionList.js +5 -5
  294. package/Libraries/Lists/SectionListModern.js +6 -6
  295. package/Libraries/Lists/StateSafePureComponent.js +85 -0
  296. package/Libraries/Lists/ViewabilityHelper.js +33 -12
  297. package/Libraries/Lists/VirtualizeUtils.js +17 -13
  298. package/Libraries/Lists/VirtualizedList.d.ts +317 -0
  299. package/Libraries/Lists/VirtualizedList.js +548 -890
  300. package/Libraries/Lists/VirtualizedListCellRenderer.js +259 -0
  301. package/Libraries/Lists/VirtualizedListContext.js +7 -48
  302. package/Libraries/Lists/VirtualizedListProps.js +279 -0
  303. package/Libraries/Lists/VirtualizedSectionList.js +6 -3
  304. package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +1 -1
  305. package/Libraries/LogBox/Data/LogBoxData.js +9 -8
  306. package/Libraries/LogBox/Data/LogBoxLog.js +5 -5
  307. package/Libraries/LogBox/Data/LogBoxSymbolication.js +4 -4
  308. package/Libraries/LogBox/Data/parseLogBoxLog.js +5 -3
  309. package/Libraries/LogBox/LogBox.d.ts +28 -0
  310. package/Libraries/LogBox/LogBox.js +11 -11
  311. package/Libraries/LogBox/LogBoxInspectorContainer.js +5 -3
  312. package/Libraries/LogBox/LogBoxNotificationContainer.js +2 -2
  313. package/Libraries/LogBox/UI/AnsiHighlight.js +5 -3
  314. package/Libraries/LogBox/UI/LogBoxButton.js +6 -5
  315. package/Libraries/LogBox/UI/LogBoxInspector.js +6 -6
  316. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +9 -8
  317. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +3 -3
  318. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +7 -6
  319. package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +6 -5
  320. package/Libraries/LogBox/UI/LogBoxInspectorMessageHeader.js +6 -5
  321. package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +7 -6
  322. package/Libraries/LogBox/UI/LogBoxInspectorSection.js +2 -2
  323. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +3 -3
  324. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +5 -5
  325. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.win32.js +5 -5
  326. package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +5 -5
  327. package/Libraries/LogBox/UI/LogBoxMessage.js +3 -3
  328. package/Libraries/LogBox/UI/LogBoxNotification.js +6 -5
  329. package/Libraries/Modal/Modal.d.ts +104 -0
  330. package/Libraries/Modal/Modal.js +14 -14
  331. package/Libraries/Modal/NativeModalManager.js +1 -0
  332. package/Libraries/Modal/RCTModalHostViewNativeComponent.js +3 -3
  333. package/Libraries/NativeComponent/BaseViewConfig.android.js +27 -2
  334. package/Libraries/NativeComponent/BaseViewConfig.ios.js +8 -3
  335. package/Libraries/NativeComponent/BaseViewConfig.win32.js +8 -3
  336. package/Libraries/NativeComponent/NativeComponentRegistry.js +5 -4
  337. package/Libraries/NativeComponent/PlatformBaseViewConfig.js +1 -0
  338. package/Libraries/NativeComponent/StaticViewConfigValidator.js +1 -1
  339. package/Libraries/NativeComponent/ViewConfig.js +1 -0
  340. package/Libraries/NativeModules/specs/NativeAnimationsDebugModule.js +1 -0
  341. package/Libraries/NativeModules/specs/NativeDevMenu.js +1 -0
  342. package/Libraries/NativeModules/specs/NativeDevSettings.js +1 -0
  343. package/Libraries/NativeModules/specs/NativeDeviceEventManager.js +1 -0
  344. package/Libraries/NativeModules/specs/NativeDialogManagerAndroid.js +1 -0
  345. package/Libraries/NativeModules/specs/NativeLogBox.js +3 -2
  346. package/Libraries/NativeModules/specs/NativeRedBox.js +1 -0
  347. package/Libraries/NativeModules/specs/NativeSourceCode.js +1 -0
  348. package/Libraries/Network/NativeNetworkingAndroid.js +1 -0
  349. package/Libraries/Network/NativeNetworkingIOS.js +1 -0
  350. package/Libraries/Network/RCTNetworking.android.js +4 -3
  351. package/Libraries/Network/RCTNetworking.ios.js +3 -2
  352. package/Libraries/Network/RCTNetworking.win32.js +1 -0
  353. package/Libraries/Network/convertRequestBody.js +1 -2
  354. package/Libraries/NewAppScreen/components/DebugInstructions.js +4 -1
  355. package/Libraries/NewAppScreen/components/Header.js +6 -2
  356. package/Libraries/NewAppScreen/components/HermesBadge.js +6 -2
  357. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +8 -9
  358. package/Libraries/NewAppScreen/components/ReloadInstructions.js +4 -1
  359. package/Libraries/NewAppScreen/index.js +1 -1
  360. package/Libraries/Performance/NativeJSCSamplingProfiler.js +1 -0
  361. package/Libraries/Performance/QuickPerformanceLogger.js +34 -10
  362. package/Libraries/Performance/Systrace.d.ts +66 -0
  363. package/Libraries/Performance/Systrace.js +110 -195
  364. package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +1 -0
  365. package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +115 -0
  366. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +5 -4
  367. package/Libraries/Pressability/Pressability.js +12 -10
  368. package/Libraries/Pressability/Pressability.win32.js +9 -7
  369. package/Libraries/Pressability/PressabilityDebug.js +2 -2
  370. package/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js +1 -0
  371. package/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts +275 -0
  372. package/Libraries/PushNotificationIOS/PushNotificationIOS.js +19 -14
  373. package/Libraries/ReactNative/AppContainer.js +17 -7
  374. package/Libraries/ReactNative/AppRegistry.d.ts +68 -0
  375. package/Libraries/ReactNative/AppRegistry.js +11 -14
  376. package/Libraries/ReactNative/BridgelessUIManager.js +4 -3
  377. package/Libraries/ReactNative/FabricUIManager.js +3 -3
  378. package/Libraries/ReactNative/I18nManager.d.ts +25 -0
  379. package/Libraries/ReactNative/NativeHeadlessJsTaskSupport.js +1 -0
  380. package/Libraries/ReactNative/NativeI18nManager.js +1 -0
  381. package/Libraries/ReactNative/NativeUIManager.js +1 -0
  382. package/Libraries/ReactNative/PaperUIManager.js +2 -2
  383. package/Libraries/ReactNative/PaperUIManager.win32.js +1 -1
  384. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +9 -0
  385. package/Libraries/ReactNative/RendererImplementation.js +112 -0
  386. package/Libraries/ReactNative/RendererProxy.d.ts +20 -0
  387. package/Libraries/ReactNative/RendererProxy.js +26 -0
  388. package/Libraries/ReactNative/RootTag.js +0 -1
  389. package/Libraries/ReactNative/UIManager.d.ts +157 -0
  390. package/Libraries/ReactNative/UIManager.js +1 -1
  391. package/Libraries/ReactNative/getCachedComponentWithDebugName.js +1 -0
  392. package/Libraries/ReactNative/renderApplication.js +38 -20
  393. package/Libraries/ReactNative/requireNativeComponent.d.ts +23 -0
  394. package/Libraries/ReactNative/requireNativeComponent.js +2 -2
  395. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +10 -9
  396. package/Libraries/Renderer/implementations/ReactFabric-dev.js +312 -217
  397. package/Libraries/Renderer/implementations/ReactFabric-prod.js +212 -177
  398. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +248 -213
  399. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +311 -218
  400. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +226 -196
  401. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +262 -232
  402. package/Libraries/Renderer/implementations/ReactNativeRenderer.d.ts +149 -0
  403. package/Libraries/Renderer/shims/ReactFabric.js +2 -2
  404. package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -2
  405. package/Libraries/Renderer/shims/ReactNative.js +2 -2
  406. package/Libraries/Renderer/shims/ReactNativeTypes.d.ts +141 -0
  407. package/Libraries/Renderer/shims/ReactNativeTypes.js +23 -22
  408. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +8 -8
  409. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -2
  410. package/Libraries/Settings/NativeSettingsManager.js +1 -0
  411. package/Libraries/Settings/Settings.d.ts +18 -0
  412. package/Libraries/Share/NativeShareModule.js +1 -0
  413. package/Libraries/Share/Share.d.ts +80 -0
  414. package/Libraries/Share/Share.js +7 -5
  415. package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +1 -1
  416. package/Libraries/StyleSheet/PlatformColorValueTypes.d.ts +18 -0
  417. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +1 -1
  418. package/Libraries/StyleSheet/PlatformColorValueTypesIOS.d.ts +25 -0
  419. package/Libraries/StyleSheet/PlatformColorValueTypesIOS.ios.js +1 -0
  420. package/Libraries/StyleSheet/StyleSheet.d.ts +156 -0
  421. package/Libraries/StyleSheet/StyleSheet.js +15 -11
  422. package/Libraries/StyleSheet/StyleSheet.win32.js +16 -12
  423. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +332 -0
  424. package/Libraries/StyleSheet/StyleSheetTypes.js +101 -24
  425. package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +2 -2
  426. package/Libraries/StyleSheet/normalizeColor.js +3 -3
  427. package/Libraries/StyleSheet/private/_TransformStyle.js +26 -24
  428. package/Libraries/StyleSheet/processAspectRatio.js +53 -0
  429. package/Libraries/StyleSheet/processColor.d.ts +16 -0
  430. package/Libraries/StyleSheet/processColor.js +3 -4
  431. package/Libraries/StyleSheet/processColorArray.js +1 -0
  432. package/Libraries/StyleSheet/processFontVariant.js +30 -0
  433. package/Libraries/StyleSheet/processTransform.js +114 -105
  434. package/Libraries/StyleSheet/splitLayoutProps.js +5 -0
  435. package/Libraries/Text/Text.d.ts +209 -0
  436. package/Libraries/Text/Text.js +94 -12
  437. package/Libraries/Text/TextNativeComponent.js +49 -41
  438. package/Libraries/Text/TextNativeComponent.win32.js +67 -48
  439. package/Libraries/Text/TextProps.js +64 -7
  440. package/Libraries/{Components/MaskedView/MaskedViewIOS.win32.js → TurboModule/RCTExport.d.ts} +3 -4
  441. package/Libraries/TurboModule/TurboModuleRegistry.d.ts +15 -0
  442. package/Libraries/TurboModule/TurboModuleRegistry.js +3 -1
  443. package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +1 -0
  444. package/Libraries/Types/CoreEventTypes.d.ts +263 -0
  445. package/Libraries/Types/CoreEventTypes.js +2 -1
  446. package/Libraries/Types/CoreEventTypes.win32.js +2 -1
  447. package/Libraries/Utilities/AcessibilityMapping.js +154 -0
  448. package/Libraries/Utilities/Appearance.d.ts +43 -0
  449. package/Libraries/Utilities/Appearance.js +3 -3
  450. package/Libraries/Utilities/BackHandler.android.js +3 -5
  451. package/Libraries/Utilities/BackHandler.d.ts +38 -0
  452. package/Libraries/Utilities/BackHandler.win32.js +3 -5
  453. package/Libraries/Utilities/DevSettings.d.ts +32 -0
  454. package/Libraries/Utilities/DevSettings.js +4 -2
  455. package/Libraries/Utilities/Dimensions.d.ts +79 -0
  456. package/Libraries/Utilities/Dimensions.js +2 -2
  457. package/Libraries/Utilities/Dimensions.win32.js +2 -2
  458. package/Libraries/Utilities/GlobalPerformanceLogger.js +2 -1
  459. package/Libraries/Utilities/HMRClient.js +23 -8
  460. package/Libraries/Utilities/LoadingView.ios.js +1 -1
  461. package/Libraries/Utilities/NativeAppearance.js +1 -0
  462. package/Libraries/Utilities/NativeDevLoadingView.js +1 -0
  463. package/Libraries/Utilities/NativeDevSplitBundleLoader.js +1 -0
  464. package/Libraries/Utilities/NativeDeviceInfo.js +1 -0
  465. package/Libraries/Utilities/NativePlatformConstantsAndroid.js +1 -0
  466. package/Libraries/Utilities/NativePlatformConstantsIOS.js +1 -0
  467. package/Libraries/Utilities/NativePlatformConstantsWin.js +1 -0
  468. package/Libraries/Utilities/PerformanceLoggerContext.js +3 -2
  469. package/Libraries/Utilities/PixelRatio.d.ts +64 -0
  470. package/Libraries/Utilities/Platform.android.js +11 -5
  471. package/Libraries/Utilities/Platform.d.ts +102 -0
  472. package/Libraries/Utilities/Platform.ios.js +12 -5
  473. package/Libraries/Utilities/Platform.win32.js +11 -5
  474. package/Libraries/Utilities/PolyfillFunctions.js +1 -1
  475. package/Libraries/Utilities/ReactNativeTestTools.js +9 -15
  476. package/Libraries/Utilities/codegenNativeCommands.js +1 -10
  477. package/Libraries/Utilities/codegenNativeComponent.js +4 -1
  478. package/Libraries/Utilities/createPerformanceLogger.js +7 -8
  479. package/Libraries/Utilities/differ/deepDiffer.js +1 -1
  480. package/Libraries/Utilities/groupByEveryN.js +1 -1
  481. package/Libraries/Utilities/stringifySafe.js +3 -1
  482. package/Libraries/Utilities/useColorScheme.js +3 -2
  483. package/Libraries/Utilities/useRefEffect.js +1 -1
  484. package/Libraries/Vibration/NativeVibration.js +1 -0
  485. package/Libraries/Vibration/Vibration.d.ts +43 -0
  486. package/Libraries/Vibration/Vibration.js +1 -0
  487. package/Libraries/WebPerformance/NativePerformanceObserver.js +41 -0
  488. package/Libraries/WebPerformance/PerformanceObserver.js +223 -0
  489. package/Libraries/WebSocket/NativeWebSocketModule.js +1 -0
  490. package/Libraries/WebSocket/WebSocket.js +11 -3
  491. package/Libraries/WebSocket/WebSocketInterceptor.js +1 -1
  492. package/Libraries/YellowBox/YellowBoxDeprecated.d.ts +19 -0
  493. package/Libraries/YellowBox/YellowBoxDeprecated.js +2 -3
  494. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +2 -1
  495. package/Libraries/__tests__/ButtonWin32-test.js +16 -0
  496. package/Libraries/platform-types.d.ts +25 -0
  497. package/Libraries/vendor/core/ErrorUtils.d.ts +15 -0
  498. package/Libraries/vendor/emitter/EventEmitter.d.ts +164 -0
  499. package/babel.config.js +3 -0
  500. package/flow/jest.js +2 -2
  501. package/flow-typed/npm/{react-dom_v16.x.x.js → react-dom_v17.x.x.js} +58 -31
  502. package/flow-typed/npm/yargs_v17.x.x.js +341 -0
  503. package/index.js +89 -55
  504. package/index.win32.js +89 -55
  505. package/interface.js +8 -0
  506. package/jest/react-native-env.js +18 -0
  507. package/jest/renderer.js +2 -2
  508. package/jest/setup.js +7 -9
  509. package/jest.config.js +9 -2
  510. package/overrides.json +40 -101
  511. package/package.json +34 -33
  512. package/src/Libraries/Components/TextInput/TextInput.win32.tsx +2 -1
  513. package/src/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +2 -2
  514. package/src/Libraries/Components/Touchable/TouchableWin32.Props.tsx +2 -1
  515. package/src/Libraries/Components/Touchable/TouchableWin32.tsx +1 -1
  516. package/src/Libraries/Components/View/ViewWin32.Props.ts +10 -1
  517. package/src/Libraries/__tests__/__snapshots__/ButtonWin32-test.js.snap +22 -0
  518. package/src/Libraries/platform-types.d.ts +25 -0
  519. package/types/index.d.ts +215 -0
  520. package/IntegrationTests/AsyncStorageTest.js +0 -261
  521. package/Libraries/Components/MaskedView/MaskedViewIOS.ios.js +0 -93
  522. package/Libraries/Components/MaskedView/RCTMaskedViewNativeComponent.js +0 -21
  523. package/Libraries/Core/setUpSystrace.js +0 -21
  524. package/Libraries/Image/ImagePickerIOS.js +0 -103
  525. package/Libraries/Image/NativeImagePickerIOS.js +0 -38
  526. package/Libraries/Lists/VirtualizedList.win32.js +0 -9
  527. package/Libraries/Lists/__tests__/CellRenderMask-test.js +0 -179
  528. package/Libraries/Lists/__tests__/FillRateHelper-test.js +0 -120
  529. package/Libraries/Lists/__tests__/FlatList-test.js +0 -155
  530. package/Libraries/Lists/__tests__/SectionList-test.js +0 -109
  531. package/Libraries/Lists/__tests__/ViewabilityHelper-test.js +0 -440
  532. package/Libraries/Lists/__tests__/VirtualizeUtils-test.js +0 -91
  533. package/Libraries/Lists/__tests__/VirtualizedList-test.js +0 -1587
  534. package/Libraries/Lists/__tests__/VirtualizedSectionList-test.js +0 -269
  535. package/Libraries/Storage/AsyncStorage.js +0 -385
  536. package/Libraries/Storage/NativeAsyncLocalStorage.js +0 -44
  537. package/Libraries/Storage/NativeAsyncSQLiteDBStorage.js +0 -44
  538. package/Libraries/Utilities/JSDevSupportModule.js +0 -37
  539. package/Libraries/Utilities/NativeJSDevSupport.js +0 -23
  540. package/rntypes/BatchedBridge.d.ts +0 -23
  541. package/rntypes/Devtools.d.ts +0 -20
  542. package/rntypes/LaunchScreen.d.ts +0 -9
  543. package/rntypes/globals.d.ts +0 -497
  544. package/rntypes/index.d.ts +0 -9754
  545. package/rntypes/legacy-properties.d.ts +0 -238
  546. package/src/Libraries/Lists/__tests__/__snapshots__/FlatList-test.js.snap +0 -427
  547. package/src/Libraries/Lists/__tests__/__snapshots__/SectionList-test.js.snap +0 -391
  548. package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizedList-test.js.snap +0 -4565
  549. package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizedSectionList-test.js.snap +0 -1153
  550. package/src/rntypes/BatchedBridge.d.ts +0 -23
  551. package/src/rntypes/Devtools.d.ts +0 -20
  552. package/src/rntypes/LaunchScreen.d.ts +0 -9
  553. package/src/rntypes/globals.d.ts +0 -497
  554. package/src/rntypes/index.d.ts +0 -9754
  555. package/src/rntypes/legacy-properties.d.ts +0 -238
  556. package/src/typings-index.ts +0 -37
  557. package/typings-index.d.ts +0 -23
  558. package/typings-index.js +0 -47
  559. package/typings-index.js.map +0 -1
@@ -1,4565 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`VirtualizedList forwards correct stickyHeaderIndices when ListHeaderComponent present 1`] = `
4
- <RCTScrollView
5
- ListHeaderComponent={[Function]}
6
- data={
7
- Array [
8
- Object {
9
- "key": 0,
10
- "sticky": true,
11
- },
12
- Object {
13
- "key": 1,
14
- },
15
- Object {
16
- "key": 2,
17
- },
18
- Object {
19
- "key": 3,
20
- "sticky": true,
21
- },
22
- Object {
23
- "key": 4,
24
- },
25
- Object {
26
- "key": 5,
27
- },
28
- Object {
29
- "key": 6,
30
- "sticky": true,
31
- },
32
- Object {
33
- "key": 7,
34
- },
35
- Object {
36
- "key": 8,
37
- },
38
- Object {
39
- "key": 9,
40
- "sticky": true,
41
- },
42
- ]
43
- }
44
- getItem={[Function]}
45
- getItemCount={[Function]}
46
- getItemLayout={[Function]}
47
- initialNumToRender={10}
48
- onContentSizeChange={[Function]}
49
- onLayout={[Function]}
50
- onMomentumScrollBegin={[Function]}
51
- onMomentumScrollEnd={[Function]}
52
- onScroll={[Function]}
53
- onScrollBeginDrag={[Function]}
54
- onScrollEndDrag={[Function]}
55
- renderItem={[Function]}
56
- scrollEventThrottle={50}
57
- stickyHeaderIndices={
58
- Array [
59
- 0,
60
- 3,
61
- 6,
62
- 9,
63
- ]
64
- }
65
- >
66
- <View>
67
- <View
68
- onLayout={[Function]}
69
- >
70
- <Header />
71
- </View>
72
- <View
73
- style={null}
74
- >
75
- <MockCellItem
76
- sticky={true}
77
- value={0}
78
- />
79
- </View>
80
- <View
81
- style={null}
82
- >
83
- <MockCellItem
84
- value={1}
85
- />
86
- </View>
87
- <View
88
- style={null}
89
- >
90
- <MockCellItem
91
- value={2}
92
- />
93
- </View>
94
- <View
95
- style={null}
96
- >
97
- <MockCellItem
98
- sticky={true}
99
- value={3}
100
- />
101
- </View>
102
- <View
103
- style={null}
104
- >
105
- <MockCellItem
106
- value={4}
107
- />
108
- </View>
109
- <View
110
- style={null}
111
- >
112
- <MockCellItem
113
- value={5}
114
- />
115
- </View>
116
- <View
117
- style={null}
118
- >
119
- <MockCellItem
120
- sticky={true}
121
- value={6}
122
- />
123
- </View>
124
- <View
125
- style={null}
126
- >
127
- <MockCellItem
128
- value={7}
129
- />
130
- </View>
131
- <View
132
- style={null}
133
- >
134
- <MockCellItem
135
- value={8}
136
- />
137
- </View>
138
- <View
139
- style={null}
140
- >
141
- <MockCellItem
142
- sticky={true}
143
- value={9}
144
- />
145
- </View>
146
- </View>
147
- </RCTScrollView>
148
- `;
149
-
150
- exports[`VirtualizedList forwards correct stickyHeaderIndices when all in initial render window 1`] = `
151
- <RCTScrollView
152
- data={
153
- Array [
154
- Object {
155
- "key": 0,
156
- "sticky": true,
157
- },
158
- Object {
159
- "key": 1,
160
- },
161
- Object {
162
- "key": 2,
163
- },
164
- Object {
165
- "key": 3,
166
- "sticky": true,
167
- },
168
- Object {
169
- "key": 4,
170
- },
171
- Object {
172
- "key": 5,
173
- },
174
- Object {
175
- "key": 6,
176
- "sticky": true,
177
- },
178
- Object {
179
- "key": 7,
180
- },
181
- Object {
182
- "key": 8,
183
- },
184
- Object {
185
- "key": 9,
186
- "sticky": true,
187
- },
188
- ]
189
- }
190
- getItem={[Function]}
191
- getItemCount={[Function]}
192
- getItemLayout={[Function]}
193
- initialNumToRender={10}
194
- onContentSizeChange={[Function]}
195
- onLayout={[Function]}
196
- onMomentumScrollBegin={[Function]}
197
- onMomentumScrollEnd={[Function]}
198
- onScroll={[Function]}
199
- onScrollBeginDrag={[Function]}
200
- onScrollEndDrag={[Function]}
201
- renderItem={[Function]}
202
- scrollEventThrottle={50}
203
- stickyHeaderIndices={
204
- Array [
205
- 0,
206
- 3,
207
- 6,
208
- 9,
209
- ]
210
- }
211
- >
212
- <View>
213
- <View
214
- style={null}
215
- >
216
- <MockCellItem
217
- sticky={true}
218
- value={0}
219
- />
220
- </View>
221
- <View
222
- style={null}
223
- >
224
- <MockCellItem
225
- value={1}
226
- />
227
- </View>
228
- <View
229
- style={null}
230
- >
231
- <MockCellItem
232
- value={2}
233
- />
234
- </View>
235
- <View
236
- style={null}
237
- >
238
- <MockCellItem
239
- sticky={true}
240
- value={3}
241
- />
242
- </View>
243
- <View
244
- style={null}
245
- >
246
- <MockCellItem
247
- value={4}
248
- />
249
- </View>
250
- <View
251
- style={null}
252
- >
253
- <MockCellItem
254
- value={5}
255
- />
256
- </View>
257
- <View
258
- style={null}
259
- >
260
- <MockCellItem
261
- sticky={true}
262
- value={6}
263
- />
264
- </View>
265
- <View
266
- style={null}
267
- >
268
- <MockCellItem
269
- value={7}
270
- />
271
- </View>
272
- <View
273
- style={null}
274
- >
275
- <MockCellItem
276
- value={8}
277
- />
278
- </View>
279
- <View
280
- style={null}
281
- >
282
- <MockCellItem
283
- sticky={true}
284
- value={9}
285
- />
286
- </View>
287
- </View>
288
- </RCTScrollView>
289
- `;
290
-
291
- exports[`VirtualizedList forwards correct stickyHeaderIndices when partially in initial render window 1`] = `
292
- <RCTScrollView
293
- data={
294
- Array [
295
- Object {
296
- "key": 0,
297
- "sticky": true,
298
- },
299
- Object {
300
- "key": 1,
301
- },
302
- Object {
303
- "key": 2,
304
- },
305
- Object {
306
- "key": 3,
307
- "sticky": true,
308
- },
309
- Object {
310
- "key": 4,
311
- },
312
- Object {
313
- "key": 5,
314
- },
315
- Object {
316
- "key": 6,
317
- "sticky": true,
318
- },
319
- Object {
320
- "key": 7,
321
- },
322
- Object {
323
- "key": 8,
324
- },
325
- Object {
326
- "key": 9,
327
- "sticky": true,
328
- },
329
- ]
330
- }
331
- getItem={[Function]}
332
- getItemCount={[Function]}
333
- getItemLayout={[Function]}
334
- initialNumToRender={5}
335
- onContentSizeChange={[Function]}
336
- onLayout={[Function]}
337
- onMomentumScrollBegin={[Function]}
338
- onMomentumScrollEnd={[Function]}
339
- onScroll={[Function]}
340
- onScrollBeginDrag={[Function]}
341
- onScrollEndDrag={[Function]}
342
- renderItem={[Function]}
343
- scrollEventThrottle={50}
344
- stickyHeaderIndices={
345
- Array [
346
- 0,
347
- 3,
348
- ]
349
- }
350
- >
351
- <View>
352
- <View
353
- style={null}
354
- >
355
- <MockCellItem
356
- sticky={true}
357
- value={0}
358
- />
359
- </View>
360
- <View
361
- style={null}
362
- >
363
- <MockCellItem
364
- value={1}
365
- />
366
- </View>
367
- <View
368
- style={null}
369
- >
370
- <MockCellItem
371
- value={2}
372
- />
373
- </View>
374
- <View
375
- style={null}
376
- >
377
- <MockCellItem
378
- sticky={true}
379
- value={3}
380
- />
381
- </View>
382
- <View
383
- style={null}
384
- >
385
- <MockCellItem
386
- value={4}
387
- />
388
- </View>
389
- <View
390
- style={
391
- Object {
392
- "height": 50,
393
- }
394
- }
395
- />
396
- </View>
397
- </RCTScrollView>
398
- `;
399
-
400
- exports[`VirtualizedList handles nested lists 1`] = `
401
- <RCTScrollView
402
- data={
403
- Array [
404
- Object {
405
- "key": "outer0",
406
- },
407
- Object {
408
- "key": "outer1",
409
- },
410
- ]
411
- }
412
- getItem={[Function]}
413
- getItemCount={[Function]}
414
- onContentSizeChange={[Function]}
415
- onLayout={[Function]}
416
- onMomentumScrollBegin={[Function]}
417
- onMomentumScrollEnd={[Function]}
418
- onScroll={[Function]}
419
- onScrollBeginDrag={[Function]}
420
- onScrollEndDrag={[Function]}
421
- renderItem={[Function]}
422
- scrollEventThrottle={50}
423
- stickyHeaderIndices={Array []}
424
- >
425
- <View>
426
- <View
427
- onLayout={[Function]}
428
- style={null}
429
- >
430
- <View
431
- data={
432
- Array [
433
- Object {
434
- "key": "outer0:inner0",
435
- },
436
- Object {
437
- "key": "outer0:inner1",
438
- },
439
- ]
440
- }
441
- getItem={[Function]}
442
- getItemCount={[Function]}
443
- horizontal={false}
444
- onContentSizeChange={[Function]}
445
- onLayout={[Function]}
446
- onMomentumScrollBegin={[Function]}
447
- onMomentumScrollEnd={[Function]}
448
- onScroll={[Function]}
449
- onScrollBeginDrag={[Function]}
450
- onScrollEndDrag={[Function]}
451
- renderItem={[Function]}
452
- scrollEventThrottle={50}
453
- stickyHeaderIndices={Array []}
454
- >
455
- <View
456
- onLayout={[Function]}
457
- style={null}
458
- >
459
- <item
460
- title="outer0:inner0"
461
- />
462
- </View>
463
- <View
464
- onLayout={[Function]}
465
- style={null}
466
- >
467
- <item
468
- title="outer0:inner1"
469
- />
470
- </View>
471
- </View>
472
- </View>
473
- <View
474
- onLayout={[Function]}
475
- style={null}
476
- >
477
- <RCTScrollView
478
- data={
479
- Array [
480
- Object {
481
- "key": "outer1:inner0",
482
- },
483
- Object {
484
- "key": "outer1:inner1",
485
- },
486
- ]
487
- }
488
- getItem={[Function]}
489
- getItemCount={[Function]}
490
- horizontal={true}
491
- onContentSizeChange={[Function]}
492
- onLayout={[Function]}
493
- onMomentumScrollBegin={[Function]}
494
- onMomentumScrollEnd={[Function]}
495
- onScroll={[Function]}
496
- onScrollBeginDrag={[Function]}
497
- onScrollEndDrag={[Function]}
498
- renderItem={[Function]}
499
- scrollEventThrottle={50}
500
- stickyHeaderIndices={Array []}
501
- >
502
- <View>
503
- <View
504
- onLayout={[Function]}
505
- style={
506
- Array [
507
- Object {
508
- "flexDirection": "row",
509
- },
510
- null,
511
- ]
512
- }
513
- >
514
- <item
515
- title="outer1:inner0"
516
- />
517
- </View>
518
- <View
519
- onLayout={[Function]}
520
- style={
521
- Array [
522
- Object {
523
- "flexDirection": "row",
524
- },
525
- null,
526
- ]
527
- }
528
- >
529
- <item
530
- title="outer1:inner1"
531
- />
532
- </View>
533
- </View>
534
- </RCTScrollView>
535
- </View>
536
- </View>
537
- </RCTScrollView>
538
- `;
539
-
540
- exports[`VirtualizedList handles separators correctly 1`] = `
541
- <RCTScrollView
542
- ItemSeparatorComponent={[Function]}
543
- data={
544
- Array [
545
- Object {
546
- "key": "i0",
547
- },
548
- Object {
549
- "key": "i1",
550
- },
551
- Object {
552
- "key": "i2",
553
- },
554
- ]
555
- }
556
- getItem={[Function]}
557
- getItemCount={[Function]}
558
- onContentSizeChange={[Function]}
559
- onLayout={[Function]}
560
- onMomentumScrollBegin={[Function]}
561
- onMomentumScrollEnd={[Function]}
562
- onScroll={[Function]}
563
- onScrollBeginDrag={[Function]}
564
- onScrollEndDrag={[Function]}
565
- renderItem={[Function]}
566
- scrollEventThrottle={50}
567
- stickyHeaderIndices={Array []}
568
- >
569
- <View>
570
- <View
571
- onLayout={[Function]}
572
- style={null}
573
- >
574
- <item
575
- title="i0"
576
- />
577
- <separator
578
- highlighted={false}
579
- leadingItem={
580
- Object {
581
- "key": "i0",
582
- }
583
- }
584
- />
585
- </View>
586
- <View
587
- onLayout={[Function]}
588
- style={null}
589
- >
590
- <item
591
- title="i1"
592
- />
593
- <separator
594
- highlighted={false}
595
- leadingItem={
596
- Object {
597
- "key": "i1",
598
- }
599
- }
600
- />
601
- </View>
602
- <View
603
- onLayout={[Function]}
604
- style={null}
605
- >
606
- <item
607
- title="i2"
608
- />
609
- </View>
610
- </View>
611
- </RCTScrollView>
612
- `;
613
-
614
- exports[`VirtualizedList handles separators correctly 2`] = `
615
- <RCTScrollView
616
- ItemSeparatorComponent={[Function]}
617
- data={
618
- Array [
619
- Object {
620
- "key": "i0",
621
- },
622
- Object {
623
- "key": "i1",
624
- },
625
- Object {
626
- "key": "i2",
627
- },
628
- ]
629
- }
630
- getItem={[Function]}
631
- getItemCount={[Function]}
632
- onContentSizeChange={[Function]}
633
- onLayout={[Function]}
634
- onMomentumScrollBegin={[Function]}
635
- onMomentumScrollEnd={[Function]}
636
- onScroll={[Function]}
637
- onScrollBeginDrag={[Function]}
638
- onScrollEndDrag={[Function]}
639
- renderItem={[Function]}
640
- scrollEventThrottle={50}
641
- stickyHeaderIndices={Array []}
642
- >
643
- <View>
644
- <View
645
- onLayout={[Function]}
646
- style={null}
647
- >
648
- <item
649
- title="i0"
650
- />
651
- <separator
652
- highlighted={true}
653
- leadingItem={
654
- Object {
655
- "key": "i0",
656
- }
657
- }
658
- />
659
- </View>
660
- <View
661
- onLayout={[Function]}
662
- style={null}
663
- >
664
- <item
665
- title="i1"
666
- />
667
- <separator
668
- highlighted={true}
669
- leadingItem={
670
- Object {
671
- "key": "i1",
672
- }
673
- }
674
- />
675
- </View>
676
- <View
677
- onLayout={[Function]}
678
- style={null}
679
- >
680
- <item
681
- title="i2"
682
- />
683
- </View>
684
- </View>
685
- </RCTScrollView>
686
- `;
687
-
688
- exports[`VirtualizedList handles separators correctly 3`] = `
689
- <RCTScrollView
690
- ItemSeparatorComponent={[Function]}
691
- data={
692
- Array [
693
- Object {
694
- "key": "i0",
695
- },
696
- Object {
697
- "key": "i1",
698
- },
699
- Object {
700
- "key": "i2",
701
- },
702
- ]
703
- }
704
- getItem={[Function]}
705
- getItemCount={[Function]}
706
- onContentSizeChange={[Function]}
707
- onLayout={[Function]}
708
- onMomentumScrollBegin={[Function]}
709
- onMomentumScrollEnd={[Function]}
710
- onScroll={[Function]}
711
- onScrollBeginDrag={[Function]}
712
- onScrollEndDrag={[Function]}
713
- renderItem={[Function]}
714
- scrollEventThrottle={50}
715
- stickyHeaderIndices={Array []}
716
- >
717
- <View>
718
- <View
719
- onLayout={[Function]}
720
- style={null}
721
- >
722
- <item
723
- title="i0"
724
- />
725
- <separator
726
- highlighted={true}
727
- leadingItem={
728
- Object {
729
- "key": "i0",
730
- }
731
- }
732
- />
733
- </View>
734
- <View
735
- onLayout={[Function]}
736
- style={null}
737
- >
738
- <item
739
- title="i1"
740
- />
741
- <separator
742
- highlighted={true}
743
- leadingItem={
744
- Object {
745
- "key": "i1",
746
- }
747
- }
748
- press={true}
749
- />
750
- </View>
751
- <View
752
- onLayout={[Function]}
753
- style={null}
754
- >
755
- <item
756
- title="i2"
757
- />
758
- </View>
759
- </View>
760
- </RCTScrollView>
761
- `;
762
-
763
- exports[`VirtualizedList keeps sticky headers above viewport visualized 1`] = `
764
- <RCTScrollView
765
- data={
766
- Array [
767
- Object {
768
- "key": 0,
769
- "sticky": true,
770
- },
771
- Object {
772
- "key": 1,
773
- },
774
- Object {
775
- "key": 2,
776
- },
777
- Object {
778
- "key": 3,
779
- "sticky": true,
780
- },
781
- Object {
782
- "key": 4,
783
- },
784
- Object {
785
- "key": 5,
786
- },
787
- Object {
788
- "key": 6,
789
- "sticky": true,
790
- },
791
- Object {
792
- "key": 7,
793
- },
794
- Object {
795
- "key": 8,
796
- },
797
- Object {
798
- "key": 9,
799
- "sticky": true,
800
- },
801
- Object {
802
- "key": 10,
803
- },
804
- Object {
805
- "key": 11,
806
- },
807
- Object {
808
- "key": 12,
809
- "sticky": true,
810
- },
811
- Object {
812
- "key": 13,
813
- },
814
- Object {
815
- "key": 14,
816
- },
817
- Object {
818
- "key": 15,
819
- "sticky": true,
820
- },
821
- Object {
822
- "key": 16,
823
- },
824
- Object {
825
- "key": 17,
826
- },
827
- Object {
828
- "key": 18,
829
- "sticky": true,
830
- },
831
- Object {
832
- "key": 19,
833
- },
834
- ]
835
- }
836
- getItem={[Function]}
837
- getItemCount={[Function]}
838
- getItemLayout={[Function]}
839
- initialNumToRender={1}
840
- onContentSizeChange={[Function]}
841
- onLayout={[Function]}
842
- onMomentumScrollBegin={[Function]}
843
- onMomentumScrollEnd={[Function]}
844
- onScroll={[Function]}
845
- onScrollBeginDrag={[Function]}
846
- onScrollEndDrag={[Function]}
847
- renderItem={[Function]}
848
- scrollEventThrottle={50}
849
- stickyHeaderIndices={
850
- Array [
851
- 0,
852
- 2,
853
- 4,
854
- 7,
855
- 10,
856
- 13,
857
- ]
858
- }
859
- windowSize={1}
860
- >
861
- <View>
862
- <View
863
- style={null}
864
- >
865
- <MockCellItem
866
- sticky={true}
867
- value={0}
868
- />
869
- </View>
870
- <View
871
- style={
872
- Object {
873
- "height": 50,
874
- }
875
- }
876
- />
877
- <View
878
- style={null}
879
- >
880
- <MockCellItem
881
- sticky={true}
882
- value={6}
883
- />
884
- </View>
885
- <View
886
- style={
887
- Object {
888
- "height": 20,
889
- }
890
- }
891
- />
892
- <View
893
- style={null}
894
- >
895
- <MockCellItem
896
- sticky={true}
897
- value={9}
898
- />
899
- </View>
900
- <View
901
- style={null}
902
- >
903
- <MockCellItem
904
- value={10}
905
- />
906
- </View>
907
- <View
908
- style={null}
909
- >
910
- <MockCellItem
911
- value={11}
912
- />
913
- </View>
914
- <View
915
- style={null}
916
- >
917
- <MockCellItem
918
- sticky={true}
919
- value={12}
920
- />
921
- </View>
922
- <View
923
- style={null}
924
- >
925
- <MockCellItem
926
- value={13}
927
- />
928
- </View>
929
- <View
930
- style={null}
931
- >
932
- <MockCellItem
933
- value={14}
934
- />
935
- </View>
936
- <View
937
- style={null}
938
- >
939
- <MockCellItem
940
- sticky={true}
941
- value={15}
942
- />
943
- </View>
944
- <View
945
- style={null}
946
- >
947
- <MockCellItem
948
- value={16}
949
- />
950
- </View>
951
- <View
952
- style={null}
953
- >
954
- <MockCellItem
955
- value={17}
956
- />
957
- </View>
958
- <View
959
- style={null}
960
- >
961
- <MockCellItem
962
- sticky={true}
963
- value={18}
964
- />
965
- </View>
966
- <View
967
- style={null}
968
- >
969
- <MockCellItem
970
- value={19}
971
- />
972
- </View>
973
- </View>
974
- </RCTScrollView>
975
- `;
976
-
977
- exports[`VirtualizedList renders all the bells and whistles 1`] = `
978
- <RCTScrollView
979
- ItemSeparatorComponent={[Function]}
980
- ListEmptyComponent={[Function]}
981
- ListFooterComponent={[Function]}
982
- ListHeaderComponent={[Function]}
983
- data={
984
- Array [
985
- Object {
986
- "id": "0",
987
- },
988
- Object {
989
- "id": "1",
990
- },
991
- Object {
992
- "id": "2",
993
- },
994
- Object {
995
- "id": "3",
996
- },
997
- Object {
998
- "id": "4",
999
- },
1000
- ]
1001
- }
1002
- getItem={[Function]}
1003
- getItemCount={[Function]}
1004
- getItemLayout={[Function]}
1005
- invertStickyHeaders={true}
1006
- inverted={true}
1007
- keyExtractor={[Function]}
1008
- onContentSizeChange={[Function]}
1009
- onLayout={[Function]}
1010
- onMomentumScrollBegin={[Function]}
1011
- onMomentumScrollEnd={[Function]}
1012
- onRefresh={[MockFunction]}
1013
- onScroll={[Function]}
1014
- onScrollBeginDrag={[Function]}
1015
- onScrollEndDrag={[Function]}
1016
- refreshControl={
1017
- <RefreshControlMock
1018
- onRefresh={[MockFunction]}
1019
- refreshing={false}
1020
- />
1021
- }
1022
- refreshing={false}
1023
- renderItem={[Function]}
1024
- scrollEventThrottle={50}
1025
- stickyHeaderIndices={Array []}
1026
- style={
1027
- Array [
1028
- Object {
1029
- "transform": Array [
1030
- Object {
1031
- "scaleY": -1,
1032
- },
1033
- ],
1034
- },
1035
- undefined,
1036
- ]
1037
- }
1038
- >
1039
- <RCTRefreshControl />
1040
- <View>
1041
- <View
1042
- onLayout={[Function]}
1043
- style={
1044
- Object {
1045
- "transform": Array [
1046
- Object {
1047
- "scaleY": -1,
1048
- },
1049
- ],
1050
- }
1051
- }
1052
- >
1053
- <header />
1054
- </View>
1055
- <View
1056
- style={
1057
- Array [
1058
- Object {
1059
- "flexDirection": "column-reverse",
1060
- },
1061
- Object {
1062
- "transform": Array [
1063
- Object {
1064
- "scaleY": -1,
1065
- },
1066
- ],
1067
- },
1068
- ]
1069
- }
1070
- >
1071
- <item
1072
- value="0"
1073
- />
1074
- <separator />
1075
- </View>
1076
- <View
1077
- style={
1078
- Array [
1079
- Object {
1080
- "flexDirection": "column-reverse",
1081
- },
1082
- Object {
1083
- "transform": Array [
1084
- Object {
1085
- "scaleY": -1,
1086
- },
1087
- ],
1088
- },
1089
- ]
1090
- }
1091
- >
1092
- <item
1093
- value="1"
1094
- />
1095
- <separator />
1096
- </View>
1097
- <View
1098
- style={
1099
- Array [
1100
- Object {
1101
- "flexDirection": "column-reverse",
1102
- },
1103
- Object {
1104
- "transform": Array [
1105
- Object {
1106
- "scaleY": -1,
1107
- },
1108
- ],
1109
- },
1110
- ]
1111
- }
1112
- >
1113
- <item
1114
- value="2"
1115
- />
1116
- <separator />
1117
- </View>
1118
- <View
1119
- style={
1120
- Array [
1121
- Object {
1122
- "flexDirection": "column-reverse",
1123
- },
1124
- Object {
1125
- "transform": Array [
1126
- Object {
1127
- "scaleY": -1,
1128
- },
1129
- ],
1130
- },
1131
- ]
1132
- }
1133
- >
1134
- <item
1135
- value="3"
1136
- />
1137
- <separator />
1138
- </View>
1139
- <View
1140
- style={
1141
- Array [
1142
- Object {
1143
- "flexDirection": "column-reverse",
1144
- },
1145
- Object {
1146
- "transform": Array [
1147
- Object {
1148
- "scaleY": -1,
1149
- },
1150
- ],
1151
- },
1152
- ]
1153
- }
1154
- >
1155
- <item
1156
- value="4"
1157
- />
1158
- </View>
1159
- <View
1160
- onLayout={[Function]}
1161
- style={
1162
- Object {
1163
- "transform": Array [
1164
- Object {
1165
- "scaleY": -1,
1166
- },
1167
- ],
1168
- }
1169
- }
1170
- >
1171
- <footer />
1172
- </View>
1173
- </View>
1174
- </RCTScrollView>
1175
- `;
1176
-
1177
- exports[`VirtualizedList renders empty list 1`] = `
1178
- <RCTScrollView
1179
- data={Array []}
1180
- getItem={[Function]}
1181
- getItemCount={[Function]}
1182
- onContentSizeChange={[Function]}
1183
- onLayout={[Function]}
1184
- onMomentumScrollBegin={[Function]}
1185
- onMomentumScrollEnd={[Function]}
1186
- onScroll={[Function]}
1187
- onScrollBeginDrag={[Function]}
1188
- onScrollEndDrag={[Function]}
1189
- renderItem={[Function]}
1190
- scrollEventThrottle={50}
1191
- stickyHeaderIndices={Array []}
1192
- >
1193
- <View />
1194
- </RCTScrollView>
1195
- `;
1196
-
1197
- exports[`VirtualizedList renders empty list after batch 1`] = `
1198
- <RCTScrollView
1199
- data={Array []}
1200
- getItem={[Function]}
1201
- getItemCount={[Function]}
1202
- onContentSizeChange={[Function]}
1203
- onLayout={[Function]}
1204
- onMomentumScrollBegin={[Function]}
1205
- onMomentumScrollEnd={[Function]}
1206
- onScroll={[Function]}
1207
- onScrollBeginDrag={[Function]}
1208
- onScrollEndDrag={[Function]}
1209
- renderItem={[Function]}
1210
- scrollEventThrottle={50}
1211
- stickyHeaderIndices={Array []}
1212
- >
1213
- <View />
1214
- </RCTScrollView>
1215
- `;
1216
-
1217
- exports[`VirtualizedList renders empty list with empty component 1`] = `
1218
- <RCTScrollView
1219
- ListEmptyComponent={[Function]}
1220
- ListFooterComponent={[Function]}
1221
- ListHeaderComponent={[Function]}
1222
- data={Array []}
1223
- getItem={[Function]}
1224
- getItemCount={[Function]}
1225
- onContentSizeChange={[Function]}
1226
- onLayout={[Function]}
1227
- onMomentumScrollBegin={[Function]}
1228
- onMomentumScrollEnd={[Function]}
1229
- onScroll={[Function]}
1230
- onScrollBeginDrag={[Function]}
1231
- onScrollEndDrag={[Function]}
1232
- renderItem={[Function]}
1233
- scrollEventThrottle={50}
1234
- stickyHeaderIndices={Array []}
1235
- >
1236
- <View>
1237
- <View
1238
- onLayout={[Function]}
1239
- >
1240
- <header />
1241
- </View>
1242
- <empty />
1243
- <View
1244
- onLayout={[Function]}
1245
- >
1246
- <footer />
1247
- </View>
1248
- </View>
1249
- </RCTScrollView>
1250
- `;
1251
-
1252
- exports[`VirtualizedList renders list with empty component 1`] = `
1253
- <RCTScrollView
1254
- ListEmptyComponent={[Function]}
1255
- data={
1256
- Array [
1257
- Object {
1258
- "key": "hello",
1259
- },
1260
- ]
1261
- }
1262
- getItem={[Function]}
1263
- getItemCount={[Function]}
1264
- onContentSizeChange={[Function]}
1265
- onLayout={[Function]}
1266
- onMomentumScrollBegin={[Function]}
1267
- onMomentumScrollEnd={[Function]}
1268
- onScroll={[Function]}
1269
- onScrollBeginDrag={[Function]}
1270
- onScrollEndDrag={[Function]}
1271
- renderItem={[Function]}
1272
- scrollEventThrottle={50}
1273
- stickyHeaderIndices={Array []}
1274
- >
1275
- <View>
1276
- <View
1277
- onLayout={[Function]}
1278
- style={null}
1279
- >
1280
- <item
1281
- value="hello"
1282
- />
1283
- </View>
1284
- </View>
1285
- </RCTScrollView>
1286
- `;
1287
-
1288
- exports[`VirtualizedList renders null list 1`] = `
1289
- <RCTScrollView
1290
- getItem={[Function]}
1291
- getItemCount={[Function]}
1292
- onContentSizeChange={[Function]}
1293
- onLayout={[Function]}
1294
- onMomentumScrollBegin={[Function]}
1295
- onMomentumScrollEnd={[Function]}
1296
- onScroll={[Function]}
1297
- onScrollBeginDrag={[Function]}
1298
- onScrollEndDrag={[Function]}
1299
- renderItem={[Function]}
1300
- scrollEventThrottle={50}
1301
- stickyHeaderIndices={Array []}
1302
- >
1303
- <View />
1304
- </RCTScrollView>
1305
- `;
1306
-
1307
- exports[`VirtualizedList renders simple list 1`] = `
1308
- <RCTScrollView
1309
- data={
1310
- Array [
1311
- Object {
1312
- "key": "i1",
1313
- },
1314
- Object {
1315
- "key": "i2",
1316
- },
1317
- Object {
1318
- "key": "i3",
1319
- },
1320
- ]
1321
- }
1322
- getItem={[Function]}
1323
- getItemCount={[Function]}
1324
- onContentSizeChange={[Function]}
1325
- onLayout={[Function]}
1326
- onMomentumScrollBegin={[Function]}
1327
- onMomentumScrollEnd={[Function]}
1328
- onScroll={[Function]}
1329
- onScrollBeginDrag={[Function]}
1330
- onScrollEndDrag={[Function]}
1331
- renderItem={[Function]}
1332
- scrollEventThrottle={50}
1333
- stickyHeaderIndices={Array []}
1334
- >
1335
- <View>
1336
- <View
1337
- onLayout={[Function]}
1338
- style={null}
1339
- >
1340
- <item
1341
- value="i1"
1342
- />
1343
- </View>
1344
- <View
1345
- onLayout={[Function]}
1346
- style={null}
1347
- >
1348
- <item
1349
- value="i2"
1350
- />
1351
- </View>
1352
- <View
1353
- onLayout={[Function]}
1354
- style={null}
1355
- >
1356
- <item
1357
- value="i3"
1358
- />
1359
- </View>
1360
- </View>
1361
- </RCTScrollView>
1362
- `;
1363
-
1364
- exports[`VirtualizedList renders simple list using ListItemComponent 1`] = `
1365
- <RCTScrollView
1366
- ListItemComponent={[Function]}
1367
- data={
1368
- Array [
1369
- Object {
1370
- "key": "i1",
1371
- },
1372
- Object {
1373
- "key": "i2",
1374
- },
1375
- Object {
1376
- "key": "i3",
1377
- },
1378
- ]
1379
- }
1380
- getItem={[Function]}
1381
- getItemCount={[Function]}
1382
- onContentSizeChange={[Function]}
1383
- onLayout={[Function]}
1384
- onMomentumScrollBegin={[Function]}
1385
- onMomentumScrollEnd={[Function]}
1386
- onScroll={[Function]}
1387
- onScrollBeginDrag={[Function]}
1388
- onScrollEndDrag={[Function]}
1389
- scrollEventThrottle={50}
1390
- stickyHeaderIndices={Array []}
1391
- >
1392
- <View>
1393
- <View
1394
- onLayout={[Function]}
1395
- style={null}
1396
- >
1397
- <item
1398
- value="i1"
1399
- />
1400
- </View>
1401
- <View
1402
- onLayout={[Function]}
1403
- style={null}
1404
- >
1405
- <item
1406
- value="i2"
1407
- />
1408
- </View>
1409
- <View
1410
- onLayout={[Function]}
1411
- style={null}
1412
- >
1413
- <item
1414
- value="i3"
1415
- />
1416
- </View>
1417
- </View>
1418
- </RCTScrollView>
1419
- `;
1420
-
1421
- exports[`VirtualizedList renders sticky headers in viewport on batched render 1`] = `
1422
- <RCTScrollView
1423
- data={
1424
- Array [
1425
- Object {
1426
- "key": 0,
1427
- "sticky": true,
1428
- },
1429
- Object {
1430
- "key": 1,
1431
- },
1432
- Object {
1433
- "key": 2,
1434
- },
1435
- Object {
1436
- "key": 3,
1437
- "sticky": true,
1438
- },
1439
- Object {
1440
- "key": 4,
1441
- },
1442
- Object {
1443
- "key": 5,
1444
- },
1445
- Object {
1446
- "key": 6,
1447
- "sticky": true,
1448
- },
1449
- Object {
1450
- "key": 7,
1451
- },
1452
- Object {
1453
- "key": 8,
1454
- },
1455
- Object {
1456
- "key": 9,
1457
- "sticky": true,
1458
- },
1459
- ]
1460
- }
1461
- getItem={[Function]}
1462
- getItemCount={[Function]}
1463
- getItemLayout={[Function]}
1464
- initialNumToRender={1}
1465
- onContentSizeChange={[Function]}
1466
- onLayout={[Function]}
1467
- onMomentumScrollBegin={[Function]}
1468
- onMomentumScrollEnd={[Function]}
1469
- onScroll={[Function]}
1470
- onScrollBeginDrag={[Function]}
1471
- onScrollEndDrag={[Function]}
1472
- renderItem={[Function]}
1473
- scrollEventThrottle={50}
1474
- stickyHeaderIndices={
1475
- Array [
1476
- 0,
1477
- 3,
1478
- ]
1479
- }
1480
- windowSize={1}
1481
- >
1482
- <View>
1483
- <View
1484
- style={null}
1485
- >
1486
- <MockCellItem
1487
- sticky={true}
1488
- value={0}
1489
- />
1490
- </View>
1491
- <View
1492
- style={null}
1493
- >
1494
- <MockCellItem
1495
- value={1}
1496
- />
1497
- </View>
1498
- <View
1499
- style={null}
1500
- >
1501
- <MockCellItem
1502
- value={2}
1503
- />
1504
- </View>
1505
- <View
1506
- style={null}
1507
- >
1508
- <MockCellItem
1509
- sticky={true}
1510
- value={3}
1511
- />
1512
- </View>
1513
- <View
1514
- style={null}
1515
- >
1516
- <MockCellItem
1517
- value={4}
1518
- />
1519
- </View>
1520
- <View
1521
- style={
1522
- Object {
1523
- "height": 50,
1524
- }
1525
- }
1526
- />
1527
- </View>
1528
- </RCTScrollView>
1529
- `;
1530
-
1531
- exports[`VirtualizedList test getItem functionality where data is not an Array 1`] = `
1532
- <RCTScrollView
1533
- data={
1534
- Map {
1535
- "id_0" => Object {
1536
- "key": "item_0",
1537
- },
1538
- }
1539
- }
1540
- getItem={[Function]}
1541
- getItemCount={[Function]}
1542
- onContentSizeChange={[Function]}
1543
- onLayout={[Function]}
1544
- onMomentumScrollBegin={[Function]}
1545
- onMomentumScrollEnd={[Function]}
1546
- onScroll={[Function]}
1547
- onScrollBeginDrag={[Function]}
1548
- onScrollEndDrag={[Function]}
1549
- renderItem={[Function]}
1550
- scrollEventThrottle={50}
1551
- stickyHeaderIndices={Array []}
1552
- >
1553
- <View>
1554
- <View
1555
- onLayout={[Function]}
1556
- style={null}
1557
- >
1558
- <item
1559
- value="item_0"
1560
- />
1561
- </View>
1562
- </View>
1563
- </RCTScrollView>
1564
- `;
1565
-
1566
- exports[`VirtualizedList warns if both renderItem or ListItemComponent are specified. Uses ListItemComponent 1`] = `
1567
- <RCTScrollView
1568
- ListItemComponent={[Function]}
1569
- data={
1570
- Array [
1571
- Object {
1572
- "key": "i1",
1573
- },
1574
- ]
1575
- }
1576
- getItem={[Function]}
1577
- getItemCount={[Function]}
1578
- onContentSizeChange={[Function]}
1579
- onLayout={[Function]}
1580
- onMomentumScrollBegin={[Function]}
1581
- onMomentumScrollEnd={[Function]}
1582
- onScroll={[Function]}
1583
- onScrollBeginDrag={[Function]}
1584
- onScrollEndDrag={[Function]}
1585
- renderItem={[Function]}
1586
- scrollEventThrottle={50}
1587
- stickyHeaderIndices={Array []}
1588
- >
1589
- <View>
1590
- <View
1591
- onLayout={[Function]}
1592
- style={null}
1593
- >
1594
- <item
1595
- testID="i1-ListItemComponent"
1596
- value="i1"
1597
- />
1598
- </View>
1599
- </View>
1600
- </RCTScrollView>
1601
- `;
1602
-
1603
- exports[`adjusts render area with non-zero initialScrollIndex 1`] = `
1604
- <RCTScrollView
1605
- data={
1606
- Array [
1607
- Object {
1608
- "key": 0,
1609
- },
1610
- Object {
1611
- "key": 1,
1612
- },
1613
- Object {
1614
- "key": 2,
1615
- },
1616
- Object {
1617
- "key": 3,
1618
- },
1619
- Object {
1620
- "key": 4,
1621
- },
1622
- Object {
1623
- "key": 5,
1624
- },
1625
- Object {
1626
- "key": 6,
1627
- },
1628
- Object {
1629
- "key": 7,
1630
- },
1631
- Object {
1632
- "key": 8,
1633
- },
1634
- Object {
1635
- "key": 9,
1636
- },
1637
- Object {
1638
- "key": 10,
1639
- },
1640
- Object {
1641
- "key": 11,
1642
- },
1643
- Object {
1644
- "key": 12,
1645
- },
1646
- Object {
1647
- "key": 13,
1648
- },
1649
- Object {
1650
- "key": 14,
1651
- },
1652
- Object {
1653
- "key": 15,
1654
- },
1655
- Object {
1656
- "key": 16,
1657
- },
1658
- Object {
1659
- "key": 17,
1660
- },
1661
- Object {
1662
- "key": 18,
1663
- },
1664
- Object {
1665
- "key": 19,
1666
- },
1667
- ]
1668
- }
1669
- getItem={[Function]}
1670
- getItemCount={[Function]}
1671
- getItemLayout={[Function]}
1672
- initialNumToRender={5}
1673
- initialScrollIndex={1}
1674
- maxToRenderPerBatch={10}
1675
- onContentSizeChange={[Function]}
1676
- onLayout={[Function]}
1677
- onMomentumScrollBegin={[Function]}
1678
- onMomentumScrollEnd={[Function]}
1679
- onScroll={[Function]}
1680
- onScrollBeginDrag={[Function]}
1681
- onScrollEndDrag={[Function]}
1682
- renderItem={[Function]}
1683
- scrollEventThrottle={50}
1684
- stickyHeaderIndices={Array []}
1685
- windowSize={10}
1686
- >
1687
- <View>
1688
- <View
1689
- style={null}
1690
- >
1691
- <MockCellItem
1692
- value={0}
1693
- />
1694
- </View>
1695
- <View
1696
- style={null}
1697
- >
1698
- <MockCellItem
1699
- value={1}
1700
- />
1701
- </View>
1702
- <View
1703
- style={null}
1704
- >
1705
- <MockCellItem
1706
- value={2}
1707
- />
1708
- </View>
1709
- <View
1710
- style={null}
1711
- >
1712
- <MockCellItem
1713
- value={3}
1714
- />
1715
- </View>
1716
- <View
1717
- style={null}
1718
- >
1719
- <MockCellItem
1720
- value={4}
1721
- />
1722
- </View>
1723
- <View
1724
- style={null}
1725
- >
1726
- <MockCellItem
1727
- value={5}
1728
- />
1729
- </View>
1730
- <View
1731
- style={null}
1732
- >
1733
- <MockCellItem
1734
- value={6}
1735
- />
1736
- </View>
1737
- <View
1738
- style={null}
1739
- >
1740
- <MockCellItem
1741
- value={7}
1742
- />
1743
- </View>
1744
- <View
1745
- style={null}
1746
- >
1747
- <MockCellItem
1748
- value={8}
1749
- />
1750
- </View>
1751
- <View
1752
- style={null}
1753
- >
1754
- <MockCellItem
1755
- value={9}
1756
- />
1757
- </View>
1758
- <View
1759
- style={null}
1760
- >
1761
- <MockCellItem
1762
- value={10}
1763
- />
1764
- </View>
1765
- <View
1766
- style={null}
1767
- >
1768
- <MockCellItem
1769
- value={11}
1770
- />
1771
- </View>
1772
- <View
1773
- style={null}
1774
- >
1775
- <MockCellItem
1776
- value={12}
1777
- />
1778
- </View>
1779
- <View
1780
- style={null}
1781
- >
1782
- <MockCellItem
1783
- value={13}
1784
- />
1785
- </View>
1786
- <View
1787
- style={null}
1788
- >
1789
- <MockCellItem
1790
- value={14}
1791
- />
1792
- </View>
1793
- <View
1794
- style={null}
1795
- >
1796
- <MockCellItem
1797
- value={15}
1798
- />
1799
- </View>
1800
- <View
1801
- style={null}
1802
- >
1803
- <MockCellItem
1804
- value={16}
1805
- />
1806
- </View>
1807
- <View
1808
- style={null}
1809
- >
1810
- <MockCellItem
1811
- value={17}
1812
- />
1813
- </View>
1814
- <View
1815
- style={null}
1816
- >
1817
- <MockCellItem
1818
- value={18}
1819
- />
1820
- </View>
1821
- <View
1822
- style={null}
1823
- >
1824
- <MockCellItem
1825
- value={19}
1826
- />
1827
- </View>
1828
- </View>
1829
- </RCTScrollView>
1830
- `;
1831
-
1832
- exports[`constrains batch render region when an item is removed 1`] = `
1833
- <RCTScrollView
1834
- data={
1835
- Array [
1836
- Object {
1837
- "key": 0,
1838
- },
1839
- Object {
1840
- "key": 1,
1841
- },
1842
- Object {
1843
- "key": 2,
1844
- },
1845
- Object {
1846
- "key": 3,
1847
- },
1848
- Object {
1849
- "key": 4,
1850
- },
1851
- ]
1852
- }
1853
- getItem={[Function]}
1854
- getItemCount={[Function]}
1855
- getItemLayout={[Function]}
1856
- initialNumToRender={1}
1857
- maxToRenderPerBatch={1}
1858
- onContentSizeChange={[Function]}
1859
- onLayout={[Function]}
1860
- onMomentumScrollBegin={[Function]}
1861
- onMomentumScrollEnd={[Function]}
1862
- onScroll={[Function]}
1863
- onScrollBeginDrag={[Function]}
1864
- onScrollEndDrag={[Function]}
1865
- renderItem={[Function]}
1866
- scrollEventThrottle={50}
1867
- stickyHeaderIndices={Array []}
1868
- >
1869
- <View>
1870
- <View
1871
- style={null}
1872
- >
1873
- <MockCellItem
1874
- value={0}
1875
- />
1876
- </View>
1877
- <View
1878
- style={null}
1879
- >
1880
- <MockCellItem
1881
- value={1}
1882
- />
1883
- </View>
1884
- <View
1885
- style={null}
1886
- >
1887
- <MockCellItem
1888
- value={2}
1889
- />
1890
- </View>
1891
- <View
1892
- style={null}
1893
- >
1894
- <MockCellItem
1895
- value={3}
1896
- />
1897
- </View>
1898
- <View
1899
- style={null}
1900
- >
1901
- <MockCellItem
1902
- value={4}
1903
- />
1904
- </View>
1905
- </View>
1906
- </RCTScrollView>
1907
- `;
1908
-
1909
- exports[`discards intitial render if initialScrollIndex != 0 1`] = `
1910
- <RCTScrollView
1911
- data={
1912
- Array [
1913
- Object {
1914
- "key": 0,
1915
- },
1916
- Object {
1917
- "key": 1,
1918
- },
1919
- Object {
1920
- "key": 2,
1921
- },
1922
- Object {
1923
- "key": 3,
1924
- },
1925
- Object {
1926
- "key": 4,
1927
- },
1928
- Object {
1929
- "key": 5,
1930
- },
1931
- Object {
1932
- "key": 6,
1933
- },
1934
- Object {
1935
- "key": 7,
1936
- },
1937
- Object {
1938
- "key": 8,
1939
- },
1940
- Object {
1941
- "key": 9,
1942
- },
1943
- Object {
1944
- "key": 10,
1945
- },
1946
- Object {
1947
- "key": 11,
1948
- },
1949
- Object {
1950
- "key": 12,
1951
- },
1952
- Object {
1953
- "key": 13,
1954
- },
1955
- Object {
1956
- "key": 14,
1957
- },
1958
- Object {
1959
- "key": 15,
1960
- },
1961
- Object {
1962
- "key": 16,
1963
- },
1964
- Object {
1965
- "key": 17,
1966
- },
1967
- Object {
1968
- "key": 18,
1969
- },
1970
- Object {
1971
- "key": 19,
1972
- },
1973
- ]
1974
- }
1975
- getItem={[Function]}
1976
- getItemCount={[Function]}
1977
- getItemLayout={[Function]}
1978
- initialNumToRender={5}
1979
- initialScrollIndex={5}
1980
- onContentSizeChange={[Function]}
1981
- onLayout={[Function]}
1982
- onMomentumScrollBegin={[Function]}
1983
- onMomentumScrollEnd={[Function]}
1984
- onScroll={[Function]}
1985
- onScrollBeginDrag={[Function]}
1986
- onScrollEndDrag={[Function]}
1987
- renderItem={[Function]}
1988
- scrollEventThrottle={50}
1989
- stickyHeaderIndices={Array []}
1990
- windowSize={1}
1991
- >
1992
- <View>
1993
- <View
1994
- style={
1995
- Object {
1996
- "height": 90,
1997
- }
1998
- }
1999
- />
2000
- <View
2001
- style={null}
2002
- >
2003
- <MockCellItem
2004
- value={9}
2005
- />
2006
- </View>
2007
- <View
2008
- style={null}
2009
- >
2010
- <MockCellItem
2011
- value={10}
2012
- />
2013
- </View>
2014
- <View
2015
- style={null}
2016
- >
2017
- <MockCellItem
2018
- value={11}
2019
- />
2020
- </View>
2021
- <View
2022
- style={null}
2023
- >
2024
- <MockCellItem
2025
- value={12}
2026
- />
2027
- </View>
2028
- <View
2029
- style={null}
2030
- >
2031
- <MockCellItem
2032
- value={13}
2033
- />
2034
- </View>
2035
- <View
2036
- style={null}
2037
- >
2038
- <MockCellItem
2039
- value={14}
2040
- />
2041
- </View>
2042
- <View
2043
- style={null}
2044
- >
2045
- <MockCellItem
2046
- value={15}
2047
- />
2048
- </View>
2049
- <View
2050
- style={null}
2051
- >
2052
- <MockCellItem
2053
- value={16}
2054
- />
2055
- </View>
2056
- <View
2057
- style={null}
2058
- >
2059
- <MockCellItem
2060
- value={17}
2061
- />
2062
- </View>
2063
- <View
2064
- style={null}
2065
- >
2066
- <MockCellItem
2067
- value={18}
2068
- />
2069
- </View>
2070
- <View
2071
- style={null}
2072
- >
2073
- <MockCellItem
2074
- value={19}
2075
- />
2076
- </View>
2077
- </View>
2078
- </RCTScrollView>
2079
- `;
2080
-
2081
- exports[`does not adjust render area until content area layed out 1`] = `
2082
- <RCTScrollView
2083
- data={
2084
- Array [
2085
- Object {
2086
- "key": 0,
2087
- },
2088
- Object {
2089
- "key": 1,
2090
- },
2091
- Object {
2092
- "key": 2,
2093
- },
2094
- Object {
2095
- "key": 3,
2096
- },
2097
- Object {
2098
- "key": 4,
2099
- },
2100
- Object {
2101
- "key": 5,
2102
- },
2103
- Object {
2104
- "key": 6,
2105
- },
2106
- Object {
2107
- "key": 7,
2108
- },
2109
- Object {
2110
- "key": 8,
2111
- },
2112
- Object {
2113
- "key": 9,
2114
- },
2115
- Object {
2116
- "key": 10,
2117
- },
2118
- Object {
2119
- "key": 11,
2120
- },
2121
- Object {
2122
- "key": 12,
2123
- },
2124
- Object {
2125
- "key": 13,
2126
- },
2127
- Object {
2128
- "key": 14,
2129
- },
2130
- Object {
2131
- "key": 15,
2132
- },
2133
- Object {
2134
- "key": 16,
2135
- },
2136
- Object {
2137
- "key": 17,
2138
- },
2139
- Object {
2140
- "key": 18,
2141
- },
2142
- Object {
2143
- "key": 19,
2144
- },
2145
- ]
2146
- }
2147
- getItem={[Function]}
2148
- getItemCount={[Function]}
2149
- getItemLayout={[Function]}
2150
- initialNumToRender={5}
2151
- onContentSizeChange={[Function]}
2152
- onLayout={[Function]}
2153
- onMomentumScrollBegin={[Function]}
2154
- onMomentumScrollEnd={[Function]}
2155
- onScroll={[Function]}
2156
- onScrollBeginDrag={[Function]}
2157
- onScrollEndDrag={[Function]}
2158
- renderItem={[Function]}
2159
- scrollEventThrottle={50}
2160
- stickyHeaderIndices={Array []}
2161
- windowSize={10}
2162
- >
2163
- <View>
2164
- <View
2165
- style={null}
2166
- >
2167
- <MockCellItem
2168
- value={0}
2169
- />
2170
- </View>
2171
- <View
2172
- style={null}
2173
- >
2174
- <MockCellItem
2175
- value={1}
2176
- />
2177
- </View>
2178
- <View
2179
- style={null}
2180
- >
2181
- <MockCellItem
2182
- value={2}
2183
- />
2184
- </View>
2185
- <View
2186
- style={null}
2187
- >
2188
- <MockCellItem
2189
- value={3}
2190
- />
2191
- </View>
2192
- <View
2193
- style={null}
2194
- >
2195
- <MockCellItem
2196
- value={4}
2197
- />
2198
- </View>
2199
- <View
2200
- style={
2201
- Object {
2202
- "height": 150,
2203
- }
2204
- }
2205
- />
2206
- </View>
2207
- </RCTScrollView>
2208
- `;
2209
-
2210
- exports[`does not over-render when there is less than initialNumToRender cells 1`] = `
2211
- <RCTScrollView
2212
- data={
2213
- Array [
2214
- Object {
2215
- "key": 0,
2216
- },
2217
- Object {
2218
- "key": 1,
2219
- },
2220
- Object {
2221
- "key": 2,
2222
- },
2223
- Object {
2224
- "key": 3,
2225
- },
2226
- Object {
2227
- "key": 4,
2228
- },
2229
- Object {
2230
- "key": 5,
2231
- },
2232
- Object {
2233
- "key": 6,
2234
- },
2235
- Object {
2236
- "key": 7,
2237
- },
2238
- Object {
2239
- "key": 8,
2240
- },
2241
- Object {
2242
- "key": 9,
2243
- },
2244
- ]
2245
- }
2246
- getItem={[Function]}
2247
- getItemCount={[Function]}
2248
- getItemLayout={[Function]}
2249
- initialNumToRender={20}
2250
- initialScrollIndex={4}
2251
- onContentSizeChange={[Function]}
2252
- onLayout={[Function]}
2253
- onMomentumScrollBegin={[Function]}
2254
- onMomentumScrollEnd={[Function]}
2255
- onScroll={[Function]}
2256
- onScrollBeginDrag={[Function]}
2257
- onScrollEndDrag={[Function]}
2258
- renderItem={[Function]}
2259
- scrollEventThrottle={50}
2260
- stickyHeaderIndices={Array []}
2261
- >
2262
- <View>
2263
- <View
2264
- style={null}
2265
- >
2266
- <MockCellItem
2267
- value={0}
2268
- />
2269
- </View>
2270
- <View
2271
- style={null}
2272
- >
2273
- <MockCellItem
2274
- value={1}
2275
- />
2276
- </View>
2277
- <View
2278
- style={null}
2279
- >
2280
- <MockCellItem
2281
- value={2}
2282
- />
2283
- </View>
2284
- <View
2285
- style={null}
2286
- >
2287
- <MockCellItem
2288
- value={3}
2289
- />
2290
- </View>
2291
- <View
2292
- style={null}
2293
- >
2294
- <MockCellItem
2295
- value={4}
2296
- />
2297
- </View>
2298
- <View
2299
- style={null}
2300
- >
2301
- <MockCellItem
2302
- value={5}
2303
- />
2304
- </View>
2305
- <View
2306
- style={null}
2307
- >
2308
- <MockCellItem
2309
- value={6}
2310
- />
2311
- </View>
2312
- <View
2313
- style={null}
2314
- >
2315
- <MockCellItem
2316
- value={7}
2317
- />
2318
- </View>
2319
- <View
2320
- style={null}
2321
- >
2322
- <MockCellItem
2323
- value={8}
2324
- />
2325
- </View>
2326
- <View
2327
- style={null}
2328
- >
2329
- <MockCellItem
2330
- value={9}
2331
- />
2332
- </View>
2333
- </View>
2334
- </RCTScrollView>
2335
- `;
2336
-
2337
- exports[`eventually renders all items when virtualization disabled 1`] = `
2338
- <RCTScrollView
2339
- data={
2340
- Array [
2341
- Object {
2342
- "key": 0,
2343
- },
2344
- Object {
2345
- "key": 1,
2346
- },
2347
- Object {
2348
- "key": 2,
2349
- },
2350
- Object {
2351
- "key": 3,
2352
- },
2353
- Object {
2354
- "key": 4,
2355
- },
2356
- Object {
2357
- "key": 5,
2358
- },
2359
- Object {
2360
- "key": 6,
2361
- },
2362
- Object {
2363
- "key": 7,
2364
- },
2365
- Object {
2366
- "key": 8,
2367
- },
2368
- Object {
2369
- "key": 9,
2370
- },
2371
- ]
2372
- }
2373
- disableVirtualization={true}
2374
- getItem={[Function]}
2375
- getItemCount={[Function]}
2376
- getItemLayout={[Function]}
2377
- initialNumToRender={5}
2378
- initialScrollIndex={1}
2379
- maxToRenderPerBatch={10}
2380
- onContentSizeChange={[Function]}
2381
- onLayout={[Function]}
2382
- onMomentumScrollBegin={[Function]}
2383
- onMomentumScrollEnd={[Function]}
2384
- onScroll={[Function]}
2385
- onScrollBeginDrag={[Function]}
2386
- onScrollEndDrag={[Function]}
2387
- renderItem={[Function]}
2388
- scrollEventThrottle={50}
2389
- stickyHeaderIndices={Array []}
2390
- windowSize={1}
2391
- >
2392
- <View>
2393
- <View
2394
- style={null}
2395
- >
2396
- <MockCellItem
2397
- value={0}
2398
- />
2399
- </View>
2400
- <View
2401
- style={null}
2402
- >
2403
- <MockCellItem
2404
- value={1}
2405
- />
2406
- </View>
2407
- <View
2408
- style={null}
2409
- >
2410
- <MockCellItem
2411
- value={2}
2412
- />
2413
- </View>
2414
- <View
2415
- style={null}
2416
- >
2417
- <MockCellItem
2418
- value={3}
2419
- />
2420
- </View>
2421
- <View
2422
- style={null}
2423
- >
2424
- <MockCellItem
2425
- value={4}
2426
- />
2427
- </View>
2428
- <View
2429
- style={null}
2430
- >
2431
- <MockCellItem
2432
- value={5}
2433
- />
2434
- </View>
2435
- <View
2436
- style={null}
2437
- >
2438
- <MockCellItem
2439
- value={6}
2440
- />
2441
- </View>
2442
- <View
2443
- style={null}
2444
- >
2445
- <MockCellItem
2446
- value={7}
2447
- />
2448
- </View>
2449
- <View
2450
- style={null}
2451
- >
2452
- <MockCellItem
2453
- value={8}
2454
- />
2455
- </View>
2456
- <View
2457
- style={null}
2458
- >
2459
- <MockCellItem
2460
- value={9}
2461
- />
2462
- </View>
2463
- </View>
2464
- </RCTScrollView>
2465
- `;
2466
-
2467
- exports[`expands first in viewport to render up to maxToRenderPerBatch on initial render 1`] = `
2468
- <RCTScrollView
2469
- data={
2470
- Array [
2471
- Object {
2472
- "key": 0,
2473
- },
2474
- Object {
2475
- "key": 1,
2476
- },
2477
- Object {
2478
- "key": 2,
2479
- },
2480
- Object {
2481
- "key": 3,
2482
- },
2483
- Object {
2484
- "key": 4,
2485
- },
2486
- Object {
2487
- "key": 5,
2488
- },
2489
- Object {
2490
- "key": 6,
2491
- },
2492
- Object {
2493
- "key": 7,
2494
- },
2495
- Object {
2496
- "key": 8,
2497
- },
2498
- Object {
2499
- "key": 9,
2500
- },
2501
- ]
2502
- }
2503
- getItem={[Function]}
2504
- getItemCount={[Function]}
2505
- getItemLayout={[Function]}
2506
- initialNumToRender={2}
2507
- initialScrollIndex={4}
2508
- maxToRenderPerBatch={10}
2509
- onContentSizeChange={[Function]}
2510
- onLayout={[Function]}
2511
- onMomentumScrollBegin={[Function]}
2512
- onMomentumScrollEnd={[Function]}
2513
- onScroll={[Function]}
2514
- onScrollBeginDrag={[Function]}
2515
- onScrollEndDrag={[Function]}
2516
- renderItem={[Function]}
2517
- scrollEventThrottle={50}
2518
- stickyHeaderIndices={Array []}
2519
- >
2520
- <View>
2521
- <View
2522
- style={null}
2523
- >
2524
- <MockCellItem
2525
- value={0}
2526
- />
2527
- </View>
2528
- <View
2529
- style={null}
2530
- >
2531
- <MockCellItem
2532
- value={1}
2533
- />
2534
- </View>
2535
- <View
2536
- style={null}
2537
- >
2538
- <MockCellItem
2539
- value={2}
2540
- />
2541
- </View>
2542
- <View
2543
- style={null}
2544
- >
2545
- <MockCellItem
2546
- value={3}
2547
- />
2548
- </View>
2549
- <View
2550
- style={null}
2551
- >
2552
- <MockCellItem
2553
- value={4}
2554
- />
2555
- </View>
2556
- <View
2557
- style={null}
2558
- >
2559
- <MockCellItem
2560
- value={5}
2561
- />
2562
- </View>
2563
- <View
2564
- style={
2565
- Object {
2566
- "height": 40,
2567
- }
2568
- }
2569
- />
2570
- </View>
2571
- </RCTScrollView>
2572
- `;
2573
-
2574
- exports[`expands render area by maxToRenderPerBatch on tick 1`] = `
2575
- <RCTScrollView
2576
- data={
2577
- Array [
2578
- Object {
2579
- "key": 0,
2580
- },
2581
- Object {
2582
- "key": 1,
2583
- },
2584
- Object {
2585
- "key": 2,
2586
- },
2587
- Object {
2588
- "key": 3,
2589
- },
2590
- Object {
2591
- "key": 4,
2592
- },
2593
- Object {
2594
- "key": 5,
2595
- },
2596
- Object {
2597
- "key": 6,
2598
- },
2599
- Object {
2600
- "key": 7,
2601
- },
2602
- Object {
2603
- "key": 8,
2604
- },
2605
- Object {
2606
- "key": 9,
2607
- },
2608
- Object {
2609
- "key": 10,
2610
- },
2611
- Object {
2612
- "key": 11,
2613
- },
2614
- Object {
2615
- "key": 12,
2616
- },
2617
- Object {
2618
- "key": 13,
2619
- },
2620
- Object {
2621
- "key": 14,
2622
- },
2623
- Object {
2624
- "key": 15,
2625
- },
2626
- Object {
2627
- "key": 16,
2628
- },
2629
- Object {
2630
- "key": 17,
2631
- },
2632
- Object {
2633
- "key": 18,
2634
- },
2635
- Object {
2636
- "key": 19,
2637
- },
2638
- ]
2639
- }
2640
- getItem={[Function]}
2641
- getItemCount={[Function]}
2642
- getItemLayout={[Function]}
2643
- initialNumToRender={5}
2644
- maxToRenderPerBatch={2}
2645
- onContentSizeChange={[Function]}
2646
- onLayout={[Function]}
2647
- onMomentumScrollBegin={[Function]}
2648
- onMomentumScrollEnd={[Function]}
2649
- onScroll={[Function]}
2650
- onScrollBeginDrag={[Function]}
2651
- onScrollEndDrag={[Function]}
2652
- renderItem={[Function]}
2653
- scrollEventThrottle={50}
2654
- stickyHeaderIndices={Array []}
2655
- >
2656
- <View>
2657
- <View
2658
- style={null}
2659
- >
2660
- <MockCellItem
2661
- value={0}
2662
- />
2663
- </View>
2664
- <View
2665
- style={null}
2666
- >
2667
- <MockCellItem
2668
- value={1}
2669
- />
2670
- </View>
2671
- <View
2672
- style={null}
2673
- >
2674
- <MockCellItem
2675
- value={2}
2676
- />
2677
- </View>
2678
- <View
2679
- style={null}
2680
- >
2681
- <MockCellItem
2682
- value={3}
2683
- />
2684
- </View>
2685
- <View
2686
- style={null}
2687
- >
2688
- <MockCellItem
2689
- value={4}
2690
- />
2691
- </View>
2692
- <View
2693
- style={null}
2694
- >
2695
- <MockCellItem
2696
- value={5}
2697
- />
2698
- </View>
2699
- <View
2700
- style={null}
2701
- >
2702
- <MockCellItem
2703
- value={6}
2704
- />
2705
- </View>
2706
- <View
2707
- style={
2708
- Object {
2709
- "height": 130,
2710
- }
2711
- }
2712
- />
2713
- </View>
2714
- </RCTScrollView>
2715
- `;
2716
-
2717
- exports[`renders a zero-height tail spacer on initial render if getItemLayout not defined 1`] = `
2718
- <RCTScrollView
2719
- data={
2720
- Array [
2721
- Object {
2722
- "key": 0,
2723
- },
2724
- Object {
2725
- "key": 1,
2726
- },
2727
- Object {
2728
- "key": 2,
2729
- },
2730
- Object {
2731
- "key": 3,
2732
- },
2733
- Object {
2734
- "key": 4,
2735
- },
2736
- Object {
2737
- "key": 5,
2738
- },
2739
- Object {
2740
- "key": 6,
2741
- },
2742
- Object {
2743
- "key": 7,
2744
- },
2745
- Object {
2746
- "key": 8,
2747
- },
2748
- Object {
2749
- "key": 9,
2750
- },
2751
- ]
2752
- }
2753
- getItem={[Function]}
2754
- getItemCount={[Function]}
2755
- initialNumToRender={3}
2756
- onContentSizeChange={[Function]}
2757
- onLayout={[Function]}
2758
- onMomentumScrollBegin={[Function]}
2759
- onMomentumScrollEnd={[Function]}
2760
- onScroll={[Function]}
2761
- onScrollBeginDrag={[Function]}
2762
- onScrollEndDrag={[Function]}
2763
- renderItem={[Function]}
2764
- scrollEventThrottle={50}
2765
- stickyHeaderIndices={Array []}
2766
- >
2767
- <View>
2768
- <View
2769
- onLayout={[Function]}
2770
- style={null}
2771
- >
2772
- <MockCellItem
2773
- value={0}
2774
- />
2775
- </View>
2776
- <View
2777
- onLayout={[Function]}
2778
- style={null}
2779
- >
2780
- <MockCellItem
2781
- value={1}
2782
- />
2783
- </View>
2784
- <View
2785
- onLayout={[Function]}
2786
- style={null}
2787
- >
2788
- <MockCellItem
2789
- value={2}
2790
- />
2791
- </View>
2792
- <View
2793
- style={
2794
- Object {
2795
- "height": 0,
2796
- }
2797
- }
2798
- />
2799
- </View>
2800
- </RCTScrollView>
2801
- `;
2802
-
2803
- exports[`renders full tail spacer if all cells measured 1`] = `
2804
- <RCTScrollView
2805
- data={
2806
- Array [
2807
- Object {
2808
- "key": 0,
2809
- },
2810
- Object {
2811
- "key": 1,
2812
- },
2813
- Object {
2814
- "key": 2,
2815
- },
2816
- Object {
2817
- "key": 3,
2818
- },
2819
- Object {
2820
- "key": 4,
2821
- },
2822
- Object {
2823
- "key": 5,
2824
- },
2825
- Object {
2826
- "key": 6,
2827
- },
2828
- Object {
2829
- "key": 7,
2830
- },
2831
- Object {
2832
- "key": 8,
2833
- },
2834
- Object {
2835
- "key": 9,
2836
- },
2837
- ]
2838
- }
2839
- getItem={[Function]}
2840
- getItemCount={[Function]}
2841
- initialNumToRender={3}
2842
- maxToRenderPerBatch={1}
2843
- onContentSizeChange={[Function]}
2844
- onLayout={[Function]}
2845
- onMomentumScrollBegin={[Function]}
2846
- onMomentumScrollEnd={[Function]}
2847
- onScroll={[Function]}
2848
- onScrollBeginDrag={[Function]}
2849
- onScrollEndDrag={[Function]}
2850
- renderItem={[Function]}
2851
- scrollEventThrottle={50}
2852
- stickyHeaderIndices={Array []}
2853
- windowSize={1}
2854
- >
2855
- <View>
2856
- <View
2857
- onLayout={[Function]}
2858
- style={null}
2859
- >
2860
- <MockCellItem
2861
- value={0}
2862
- />
2863
- </View>
2864
- <View
2865
- onLayout={[Function]}
2866
- style={null}
2867
- >
2868
- <MockCellItem
2869
- value={1}
2870
- />
2871
- </View>
2872
- <View
2873
- onLayout={[Function]}
2874
- style={null}
2875
- >
2876
- <MockCellItem
2877
- value={2}
2878
- />
2879
- </View>
2880
- <View
2881
- onLayout={[Function]}
2882
- style={null}
2883
- >
2884
- <MockCellItem
2885
- value={3}
2886
- />
2887
- </View>
2888
- <View
2889
- onLayout={[Function]}
2890
- style={null}
2891
- >
2892
- <MockCellItem
2893
- value={4}
2894
- />
2895
- </View>
2896
- <View
2897
- style={
2898
- Object {
2899
- "height": 50,
2900
- }
2901
- }
2902
- />
2903
- </View>
2904
- </RCTScrollView>
2905
- `;
2906
-
2907
- exports[`renders initialNumToRender cells when virtualization disabled 1`] = `
2908
- <RCTScrollView
2909
- data={
2910
- Array [
2911
- Object {
2912
- "key": 0,
2913
- },
2914
- Object {
2915
- "key": 1,
2916
- },
2917
- Object {
2918
- "key": 2,
2919
- },
2920
- Object {
2921
- "key": 3,
2922
- },
2923
- Object {
2924
- "key": 4,
2925
- },
2926
- Object {
2927
- "key": 5,
2928
- },
2929
- Object {
2930
- "key": 6,
2931
- },
2932
- Object {
2933
- "key": 7,
2934
- },
2935
- Object {
2936
- "key": 8,
2937
- },
2938
- Object {
2939
- "key": 9,
2940
- },
2941
- ]
2942
- }
2943
- disableVirtualization={true}
2944
- getItem={[Function]}
2945
- getItemCount={[Function]}
2946
- getItemLayout={[Function]}
2947
- initialNumToRender={5}
2948
- initialScrollIndex={1}
2949
- onContentSizeChange={[Function]}
2950
- onLayout={[Function]}
2951
- onMomentumScrollBegin={[Function]}
2952
- onMomentumScrollEnd={[Function]}
2953
- onScroll={[Function]}
2954
- onScrollBeginDrag={[Function]}
2955
- onScrollEndDrag={[Function]}
2956
- renderItem={[Function]}
2957
- scrollEventThrottle={50}
2958
- stickyHeaderIndices={Array []}
2959
- >
2960
- <View>
2961
- <View
2962
- style={null}
2963
- >
2964
- <MockCellItem
2965
- value={0}
2966
- />
2967
- </View>
2968
- <View
2969
- style={null}
2970
- >
2971
- <MockCellItem
2972
- value={1}
2973
- />
2974
- </View>
2975
- <View
2976
- style={null}
2977
- >
2978
- <MockCellItem
2979
- value={2}
2980
- />
2981
- </View>
2982
- <View
2983
- style={null}
2984
- >
2985
- <MockCellItem
2986
- value={3}
2987
- />
2988
- </View>
2989
- <View
2990
- style={null}
2991
- >
2992
- <MockCellItem
2993
- value={4}
2994
- />
2995
- </View>
2996
- <View
2997
- style={null}
2998
- >
2999
- <MockCellItem
3000
- value={5}
3001
- />
3002
- </View>
3003
- </View>
3004
- </RCTScrollView>
3005
- `;
3006
-
3007
- exports[`renders items before initialScrollIndex on first batch tick when virtualization disabled 1`] = `
3008
- <RCTScrollView
3009
- data={
3010
- Array [
3011
- Object {
3012
- "key": 0,
3013
- },
3014
- Object {
3015
- "key": 1,
3016
- },
3017
- Object {
3018
- "key": 2,
3019
- },
3020
- Object {
3021
- "key": 3,
3022
- },
3023
- Object {
3024
- "key": 4,
3025
- },
3026
- Object {
3027
- "key": 5,
3028
- },
3029
- Object {
3030
- "key": 6,
3031
- },
3032
- Object {
3033
- "key": 7,
3034
- },
3035
- Object {
3036
- "key": 8,
3037
- },
3038
- Object {
3039
- "key": 9,
3040
- },
3041
- ]
3042
- }
3043
- disableVirtualization={true}
3044
- getItem={[Function]}
3045
- getItemCount={[Function]}
3046
- getItemLayout={[Function]}
3047
- initialNumToRender={1}
3048
- initialScrollIndex={5}
3049
- maxToRenderPerBatch={1}
3050
- onContentSizeChange={[Function]}
3051
- onLayout={[Function]}
3052
- onMomentumScrollBegin={[Function]}
3053
- onMomentumScrollEnd={[Function]}
3054
- onScroll={[Function]}
3055
- onScrollBeginDrag={[Function]}
3056
- onScrollEndDrag={[Function]}
3057
- renderItem={[Function]}
3058
- scrollEventThrottle={50}
3059
- stickyHeaderIndices={Array []}
3060
- >
3061
- <View>
3062
- <View
3063
- style={null}
3064
- >
3065
- <MockCellItem
3066
- value={0}
3067
- />
3068
- </View>
3069
- <View
3070
- style={null}
3071
- >
3072
- <MockCellItem
3073
- value={1}
3074
- />
3075
- </View>
3076
- <View
3077
- style={null}
3078
- >
3079
- <MockCellItem
3080
- value={2}
3081
- />
3082
- </View>
3083
- <View
3084
- style={null}
3085
- >
3086
- <MockCellItem
3087
- value={3}
3088
- />
3089
- </View>
3090
- <View
3091
- style={null}
3092
- >
3093
- <MockCellItem
3094
- value={4}
3095
- />
3096
- </View>
3097
- <View
3098
- style={null}
3099
- >
3100
- <MockCellItem
3101
- value={5}
3102
- />
3103
- </View>
3104
- <View
3105
- style={null}
3106
- >
3107
- <MockCellItem
3108
- value={6}
3109
- />
3110
- </View>
3111
- </View>
3112
- </RCTScrollView>
3113
- `;
3114
-
3115
- exports[`renders new items when data is updated with non-zero initialScrollIndex 1`] = `
3116
- <RCTScrollView
3117
- data={
3118
- Array [
3119
- Object {
3120
- "key": 0,
3121
- },
3122
- Object {
3123
- "key": 1,
3124
- },
3125
- Object {
3126
- "key": 2,
3127
- },
3128
- Object {
3129
- "key": 3,
3130
- },
3131
- ]
3132
- }
3133
- getItem={[Function]}
3134
- getItemCount={[Function]}
3135
- getItemLayout={[Function]}
3136
- initialNumToRender={5}
3137
- initialScrollIndex={1}
3138
- maxToRenderPerBatch={10}
3139
- onContentSizeChange={[Function]}
3140
- onLayout={[Function]}
3141
- onMomentumScrollBegin={[Function]}
3142
- onMomentumScrollEnd={[Function]}
3143
- onScroll={[Function]}
3144
- onScrollBeginDrag={[Function]}
3145
- onScrollEndDrag={[Function]}
3146
- renderItem={[Function]}
3147
- scrollEventThrottle={50}
3148
- stickyHeaderIndices={Array []}
3149
- windowSize={10}
3150
- >
3151
- <View>
3152
- <View
3153
- style={null}
3154
- >
3155
- <MockCellItem
3156
- value={0}
3157
- />
3158
- </View>
3159
- <View
3160
- style={null}
3161
- >
3162
- <MockCellItem
3163
- value={1}
3164
- />
3165
- </View>
3166
- <View
3167
- style={null}
3168
- >
3169
- <MockCellItem
3170
- value={2}
3171
- />
3172
- </View>
3173
- <View
3174
- style={null}
3175
- >
3176
- <MockCellItem
3177
- value={3}
3178
- />
3179
- </View>
3180
- </View>
3181
- </RCTScrollView>
3182
- `;
3183
-
3184
- exports[`renders no spacers up to initialScrollIndex on first render when virtualization disabled 1`] = `
3185
- <RCTScrollView
3186
- data={
3187
- Array [
3188
- Object {
3189
- "key": 0,
3190
- },
3191
- Object {
3192
- "key": 1,
3193
- },
3194
- Object {
3195
- "key": 2,
3196
- },
3197
- Object {
3198
- "key": 3,
3199
- },
3200
- Object {
3201
- "key": 4,
3202
- },
3203
- Object {
3204
- "key": 5,
3205
- },
3206
- Object {
3207
- "key": 6,
3208
- },
3209
- Object {
3210
- "key": 7,
3211
- },
3212
- Object {
3213
- "key": 8,
3214
- },
3215
- Object {
3216
- "key": 9,
3217
- },
3218
- ]
3219
- }
3220
- disableVirtualization={true}
3221
- getItem={[Function]}
3222
- getItemCount={[Function]}
3223
- getItemLayout={[Function]}
3224
- initialNumToRender={2}
3225
- initialScrollIndex={4}
3226
- maxToRenderPerBatch={1}
3227
- onContentSizeChange={[Function]}
3228
- onLayout={[Function]}
3229
- onMomentumScrollBegin={[Function]}
3230
- onMomentumScrollEnd={[Function]}
3231
- onScroll={[Function]}
3232
- onScrollBeginDrag={[Function]}
3233
- onScrollEndDrag={[Function]}
3234
- renderItem={[Function]}
3235
- scrollEventThrottle={50}
3236
- stickyHeaderIndices={Array []}
3237
- >
3238
- <View>
3239
- <View
3240
- style={null}
3241
- >
3242
- <MockCellItem
3243
- value={4}
3244
- />
3245
- </View>
3246
- <View
3247
- style={null}
3248
- >
3249
- <MockCellItem
3250
- value={5}
3251
- />
3252
- </View>
3253
- </View>
3254
- </RCTScrollView>
3255
- `;
3256
-
3257
- exports[`renders offset cells in initial render when initialScrollIndex set 1`] = `
3258
- <RCTScrollView
3259
- data={
3260
- Array [
3261
- Object {
3262
- "key": 0,
3263
- },
3264
- Object {
3265
- "key": 1,
3266
- },
3267
- Object {
3268
- "key": 2,
3269
- },
3270
- Object {
3271
- "key": 3,
3272
- },
3273
- Object {
3274
- "key": 4,
3275
- },
3276
- Object {
3277
- "key": 5,
3278
- },
3279
- Object {
3280
- "key": 6,
3281
- },
3282
- Object {
3283
- "key": 7,
3284
- },
3285
- Object {
3286
- "key": 8,
3287
- },
3288
- Object {
3289
- "key": 9,
3290
- },
3291
- ]
3292
- }
3293
- getItem={[Function]}
3294
- getItemCount={[Function]}
3295
- getItemLayout={[Function]}
3296
- initialNumToRender={4}
3297
- initialScrollIndex={4}
3298
- onContentSizeChange={[Function]}
3299
- onLayout={[Function]}
3300
- onMomentumScrollBegin={[Function]}
3301
- onMomentumScrollEnd={[Function]}
3302
- onScroll={[Function]}
3303
- onScrollBeginDrag={[Function]}
3304
- onScrollEndDrag={[Function]}
3305
- renderItem={[Function]}
3306
- scrollEventThrottle={50}
3307
- stickyHeaderIndices={Array []}
3308
- >
3309
- <View>
3310
- <View
3311
- style={null}
3312
- >
3313
- <MockCellItem
3314
- value={0}
3315
- />
3316
- </View>
3317
- <View
3318
- style={null}
3319
- >
3320
- <MockCellItem
3321
- value={1}
3322
- />
3323
- </View>
3324
- <View
3325
- style={null}
3326
- >
3327
- <MockCellItem
3328
- value={2}
3329
- />
3330
- </View>
3331
- <View
3332
- style={null}
3333
- >
3334
- <MockCellItem
3335
- value={3}
3336
- />
3337
- </View>
3338
- <View
3339
- style={null}
3340
- >
3341
- <MockCellItem
3342
- value={4}
3343
- />
3344
- </View>
3345
- <View
3346
- style={null}
3347
- >
3348
- <MockCellItem
3349
- value={5}
3350
- />
3351
- </View>
3352
- <View
3353
- style={null}
3354
- >
3355
- <MockCellItem
3356
- value={6}
3357
- />
3358
- </View>
3359
- <View
3360
- style={null}
3361
- >
3362
- <MockCellItem
3363
- value={7}
3364
- />
3365
- </View>
3366
- <View
3367
- style={
3368
- Object {
3369
- "height": 20,
3370
- }
3371
- }
3372
- />
3373
- </View>
3374
- </RCTScrollView>
3375
- `;
3376
-
3377
- exports[`renders tail spacer up to last measured index if getItemLayout not defined 1`] = `
3378
- <RCTScrollView
3379
- data={
3380
- Array [
3381
- Object {
3382
- "key": 0,
3383
- },
3384
- Object {
3385
- "key": 1,
3386
- },
3387
- Object {
3388
- "key": 2,
3389
- },
3390
- Object {
3391
- "key": 3,
3392
- },
3393
- Object {
3394
- "key": 4,
3395
- },
3396
- Object {
3397
- "key": 5,
3398
- },
3399
- Object {
3400
- "key": 6,
3401
- },
3402
- Object {
3403
- "key": 7,
3404
- },
3405
- Object {
3406
- "key": 8,
3407
- },
3408
- Object {
3409
- "key": 9,
3410
- },
3411
- ]
3412
- }
3413
- getItem={[Function]}
3414
- getItemCount={[Function]}
3415
- initialNumToRender={3}
3416
- maxToRenderPerBatch={1}
3417
- onContentSizeChange={[Function]}
3418
- onLayout={[Function]}
3419
- onMomentumScrollBegin={[Function]}
3420
- onMomentumScrollEnd={[Function]}
3421
- onScroll={[Function]}
3422
- onScrollBeginDrag={[Function]}
3423
- onScrollEndDrag={[Function]}
3424
- renderItem={[Function]}
3425
- scrollEventThrottle={50}
3426
- stickyHeaderIndices={Array []}
3427
- windowSize={1}
3428
- >
3429
- <View>
3430
- <View
3431
- onLayout={[Function]}
3432
- style={null}
3433
- >
3434
- <MockCellItem
3435
- value={0}
3436
- />
3437
- </View>
3438
- <View
3439
- onLayout={[Function]}
3440
- style={null}
3441
- >
3442
- <MockCellItem
3443
- value={1}
3444
- />
3445
- </View>
3446
- <View
3447
- onLayout={[Function]}
3448
- style={null}
3449
- >
3450
- <MockCellItem
3451
- value={2}
3452
- />
3453
- </View>
3454
- <View
3455
- onLayout={[Function]}
3456
- style={null}
3457
- >
3458
- <MockCellItem
3459
- value={3}
3460
- />
3461
- </View>
3462
- <View
3463
- onLayout={[Function]}
3464
- style={null}
3465
- >
3466
- <MockCellItem
3467
- value={4}
3468
- />
3469
- </View>
3470
- <View
3471
- style={
3472
- Object {
3473
- "height": 20,
3474
- }
3475
- }
3476
- />
3477
- </View>
3478
- </RCTScrollView>
3479
- `;
3480
-
3481
- exports[`renders tail spacer up to last measured with irregular layout when getItemLayout undefined 1`] = `
3482
- <RCTScrollView
3483
- data={
3484
- Array [
3485
- Object {
3486
- "key": 0,
3487
- },
3488
- Object {
3489
- "key": 1,
3490
- },
3491
- Object {
3492
- "key": 2,
3493
- },
3494
- Object {
3495
- "key": 3,
3496
- },
3497
- Object {
3498
- "key": 4,
3499
- },
3500
- Object {
3501
- "key": 5,
3502
- },
3503
- Object {
3504
- "key": 6,
3505
- },
3506
- Object {
3507
- "key": 7,
3508
- },
3509
- Object {
3510
- "key": 8,
3511
- },
3512
- Object {
3513
- "key": 9,
3514
- },
3515
- ]
3516
- }
3517
- getItem={[Function]}
3518
- getItemCount={[Function]}
3519
- initialNumToRender={3}
3520
- maxToRenderPerBatch={1}
3521
- onContentSizeChange={[Function]}
3522
- onLayout={[Function]}
3523
- onMomentumScrollBegin={[Function]}
3524
- onMomentumScrollEnd={[Function]}
3525
- onScroll={[Function]}
3526
- onScrollBeginDrag={[Function]}
3527
- onScrollEndDrag={[Function]}
3528
- renderItem={[Function]}
3529
- scrollEventThrottle={50}
3530
- stickyHeaderIndices={Array []}
3531
- windowSize={1}
3532
- >
3533
- <View>
3534
- <View
3535
- onLayout={[Function]}
3536
- style={null}
3537
- >
3538
- <MockCellItem
3539
- value={0}
3540
- />
3541
- </View>
3542
- <View
3543
- onLayout={[Function]}
3544
- style={null}
3545
- >
3546
- <MockCellItem
3547
- value={1}
3548
- />
3549
- </View>
3550
- <View
3551
- onLayout={[Function]}
3552
- style={null}
3553
- >
3554
- <MockCellItem
3555
- value={2}
3556
- />
3557
- </View>
3558
- <View
3559
- onLayout={[Function]}
3560
- style={null}
3561
- >
3562
- <MockCellItem
3563
- value={3}
3564
- />
3565
- </View>
3566
- <View
3567
- style={
3568
- Object {
3569
- "height": 18,
3570
- }
3571
- }
3572
- />
3573
- </View>
3574
- </RCTScrollView>
3575
- `;
3576
-
3577
- exports[`renders windowSize derived region at bottom 1`] = `
3578
- <RCTScrollView
3579
- data={
3580
- Array [
3581
- Object {
3582
- "key": 0,
3583
- },
3584
- Object {
3585
- "key": 1,
3586
- },
3587
- Object {
3588
- "key": 2,
3589
- },
3590
- Object {
3591
- "key": 3,
3592
- },
3593
- Object {
3594
- "key": 4,
3595
- },
3596
- Object {
3597
- "key": 5,
3598
- },
3599
- Object {
3600
- "key": 6,
3601
- },
3602
- Object {
3603
- "key": 7,
3604
- },
3605
- Object {
3606
- "key": 8,
3607
- },
3608
- Object {
3609
- "key": 9,
3610
- },
3611
- ]
3612
- }
3613
- getItem={[Function]}
3614
- getItemCount={[Function]}
3615
- getItemLayout={[Function]}
3616
- initialNumToRender={1}
3617
- maxToRenderPerBatch={1}
3618
- onContentSizeChange={[Function]}
3619
- onLayout={[Function]}
3620
- onMomentumScrollBegin={[Function]}
3621
- onMomentumScrollEnd={[Function]}
3622
- onScroll={[Function]}
3623
- onScrollBeginDrag={[Function]}
3624
- onScrollEndDrag={[Function]}
3625
- renderItem={[Function]}
3626
- scrollEventThrottle={50}
3627
- stickyHeaderIndices={Array []}
3628
- windowSize={3}
3629
- >
3630
- <View>
3631
- <View
3632
- style={null}
3633
- >
3634
- <MockCellItem
3635
- value={0}
3636
- />
3637
- </View>
3638
- <View
3639
- style={
3640
- Object {
3641
- "height": 40,
3642
- }
3643
- }
3644
- />
3645
- <View
3646
- style={null}
3647
- >
3648
- <MockCellItem
3649
- value={5}
3650
- />
3651
- </View>
3652
- <View
3653
- style={null}
3654
- >
3655
- <MockCellItem
3656
- value={6}
3657
- />
3658
- </View>
3659
- <View
3660
- style={null}
3661
- >
3662
- <MockCellItem
3663
- value={7}
3664
- />
3665
- </View>
3666
- <View
3667
- style={null}
3668
- >
3669
- <MockCellItem
3670
- value={8}
3671
- />
3672
- </View>
3673
- <View
3674
- style={null}
3675
- >
3676
- <MockCellItem
3677
- value={9}
3678
- />
3679
- </View>
3680
- </View>
3681
- </RCTScrollView>
3682
- `;
3683
-
3684
- exports[`renders windowSize derived region at top 1`] = `
3685
- <RCTScrollView
3686
- data={
3687
- Array [
3688
- Object {
3689
- "key": 0,
3690
- },
3691
- Object {
3692
- "key": 1,
3693
- },
3694
- Object {
3695
- "key": 2,
3696
- },
3697
- Object {
3698
- "key": 3,
3699
- },
3700
- Object {
3701
- "key": 4,
3702
- },
3703
- Object {
3704
- "key": 5,
3705
- },
3706
- Object {
3707
- "key": 6,
3708
- },
3709
- Object {
3710
- "key": 7,
3711
- },
3712
- Object {
3713
- "key": 8,
3714
- },
3715
- Object {
3716
- "key": 9,
3717
- },
3718
- ]
3719
- }
3720
- getItem={[Function]}
3721
- getItemCount={[Function]}
3722
- getItemLayout={[Function]}
3723
- initialNumToRender={1}
3724
- maxToRenderPerBatch={1}
3725
- onContentSizeChange={[Function]}
3726
- onLayout={[Function]}
3727
- onMomentumScrollBegin={[Function]}
3728
- onMomentumScrollEnd={[Function]}
3729
- onScroll={[Function]}
3730
- onScrollBeginDrag={[Function]}
3731
- onScrollEndDrag={[Function]}
3732
- renderItem={[Function]}
3733
- scrollEventThrottle={50}
3734
- stickyHeaderIndices={Array []}
3735
- windowSize={3}
3736
- >
3737
- <View>
3738
- <View
3739
- style={null}
3740
- >
3741
- <MockCellItem
3742
- value={0}
3743
- />
3744
- </View>
3745
- <View
3746
- style={null}
3747
- >
3748
- <MockCellItem
3749
- value={1}
3750
- />
3751
- </View>
3752
- <View
3753
- style={null}
3754
- >
3755
- <MockCellItem
3756
- value={2}
3757
- />
3758
- </View>
3759
- <View
3760
- style={null}
3761
- >
3762
- <MockCellItem
3763
- value={3}
3764
- />
3765
- </View>
3766
- <View
3767
- style={
3768
- Object {
3769
- "height": 60,
3770
- }
3771
- }
3772
- />
3773
- </View>
3774
- </RCTScrollView>
3775
- `;
3776
-
3777
- exports[`renders windowSize derived region in middle 1`] = `
3778
- <RCTScrollView
3779
- data={
3780
- Array [
3781
- Object {
3782
- "key": 0,
3783
- },
3784
- Object {
3785
- "key": 1,
3786
- },
3787
- Object {
3788
- "key": 2,
3789
- },
3790
- Object {
3791
- "key": 3,
3792
- },
3793
- Object {
3794
- "key": 4,
3795
- },
3796
- Object {
3797
- "key": 5,
3798
- },
3799
- Object {
3800
- "key": 6,
3801
- },
3802
- Object {
3803
- "key": 7,
3804
- },
3805
- Object {
3806
- "key": 8,
3807
- },
3808
- Object {
3809
- "key": 9,
3810
- },
3811
- ]
3812
- }
3813
- getItem={[Function]}
3814
- getItemCount={[Function]}
3815
- getItemLayout={[Function]}
3816
- initialNumToRender={1}
3817
- maxToRenderPerBatch={1}
3818
- onContentSizeChange={[Function]}
3819
- onLayout={[Function]}
3820
- onMomentumScrollBegin={[Function]}
3821
- onMomentumScrollEnd={[Function]}
3822
- onScroll={[Function]}
3823
- onScrollBeginDrag={[Function]}
3824
- onScrollEndDrag={[Function]}
3825
- renderItem={[Function]}
3826
- scrollEventThrottle={50}
3827
- stickyHeaderIndices={Array []}
3828
- windowSize={3}
3829
- >
3830
- <View>
3831
- <View
3832
- style={null}
3833
- >
3834
- <MockCellItem
3835
- value={0}
3836
- />
3837
- </View>
3838
- <View
3839
- style={
3840
- Object {
3841
- "height": 10,
3842
- }
3843
- }
3844
- />
3845
- <View
3846
- style={null}
3847
- >
3848
- <MockCellItem
3849
- value={2}
3850
- />
3851
- </View>
3852
- <View
3853
- style={null}
3854
- >
3855
- <MockCellItem
3856
- value={3}
3857
- />
3858
- </View>
3859
- <View
3860
- style={null}
3861
- >
3862
- <MockCellItem
3863
- value={4}
3864
- />
3865
- </View>
3866
- <View
3867
- style={null}
3868
- >
3869
- <MockCellItem
3870
- value={5}
3871
- />
3872
- </View>
3873
- <View
3874
- style={null}
3875
- >
3876
- <MockCellItem
3877
- value={6}
3878
- />
3879
- </View>
3880
- <View
3881
- style={null}
3882
- >
3883
- <MockCellItem
3884
- value={7}
3885
- />
3886
- </View>
3887
- <View
3888
- style={null}
3889
- >
3890
- <MockCellItem
3891
- value={8}
3892
- />
3893
- </View>
3894
- <View
3895
- style={
3896
- Object {
3897
- "height": 10,
3898
- }
3899
- }
3900
- />
3901
- </View>
3902
- </RCTScrollView>
3903
- `;
3904
-
3905
- exports[`renders zero-height tail spacer on batch render if cells not yet measured and getItemLayout not defined 1`] = `
3906
- <RCTScrollView
3907
- data={
3908
- Array [
3909
- Object {
3910
- "key": 0,
3911
- },
3912
- Object {
3913
- "key": 1,
3914
- },
3915
- Object {
3916
- "key": 2,
3917
- },
3918
- Object {
3919
- "key": 3,
3920
- },
3921
- Object {
3922
- "key": 4,
3923
- },
3924
- Object {
3925
- "key": 5,
3926
- },
3927
- Object {
3928
- "key": 6,
3929
- },
3930
- Object {
3931
- "key": 7,
3932
- },
3933
- Object {
3934
- "key": 8,
3935
- },
3936
- Object {
3937
- "key": 9,
3938
- },
3939
- ]
3940
- }
3941
- getItem={[Function]}
3942
- getItemCount={[Function]}
3943
- initialNumToRender={3}
3944
- maxToRenderPerBatch={1}
3945
- onContentSizeChange={[Function]}
3946
- onLayout={[Function]}
3947
- onMomentumScrollBegin={[Function]}
3948
- onMomentumScrollEnd={[Function]}
3949
- onScroll={[Function]}
3950
- onScrollBeginDrag={[Function]}
3951
- onScrollEndDrag={[Function]}
3952
- renderItem={[Function]}
3953
- scrollEventThrottle={50}
3954
- stickyHeaderIndices={Array []}
3955
- windowSize={1}
3956
- >
3957
- <View>
3958
- <View
3959
- onLayout={[Function]}
3960
- style={null}
3961
- >
3962
- <MockCellItem
3963
- value={0}
3964
- />
3965
- </View>
3966
- <View
3967
- onLayout={[Function]}
3968
- style={null}
3969
- >
3970
- <MockCellItem
3971
- value={1}
3972
- />
3973
- </View>
3974
- <View
3975
- onLayout={[Function]}
3976
- style={null}
3977
- >
3978
- <MockCellItem
3979
- value={2}
3980
- />
3981
- </View>
3982
- <View
3983
- style={
3984
- Object {
3985
- "height": 0,
3986
- }
3987
- }
3988
- />
3989
- </View>
3990
- </RCTScrollView>
3991
- `;
3992
-
3993
- exports[`retains batch render region when an item is appended 1`] = `
3994
- <RCTScrollView
3995
- data={
3996
- Array [
3997
- Object {
3998
- "key": 0,
3999
- },
4000
- Object {
4001
- "key": 1,
4002
- },
4003
- Object {
4004
- "key": 2,
4005
- },
4006
- Object {
4007
- "key": 3,
4008
- },
4009
- Object {
4010
- "key": 4,
4011
- },
4012
- Object {
4013
- "key": 5,
4014
- },
4015
- Object {
4016
- "key": 6,
4017
- },
4018
- Object {
4019
- "key": 7,
4020
- },
4021
- Object {
4022
- "key": 8,
4023
- },
4024
- Object {
4025
- "key": 9,
4026
- },
4027
- Object {
4028
- "key": 10,
4029
- },
4030
- ]
4031
- }
4032
- getItem={[Function]}
4033
- getItemCount={[Function]}
4034
- getItemLayout={[Function]}
4035
- initialNumToRender={1}
4036
- maxToRenderPerBatch={1}
4037
- onContentSizeChange={[Function]}
4038
- onLayout={[Function]}
4039
- onMomentumScrollBegin={[Function]}
4040
- onMomentumScrollEnd={[Function]}
4041
- onScroll={[Function]}
4042
- onScrollBeginDrag={[Function]}
4043
- onScrollEndDrag={[Function]}
4044
- renderItem={[Function]}
4045
- scrollEventThrottle={50}
4046
- stickyHeaderIndices={Array []}
4047
- >
4048
- <View>
4049
- <View
4050
- style={null}
4051
- >
4052
- <MockCellItem
4053
- value={0}
4054
- />
4055
- </View>
4056
- <View
4057
- style={null}
4058
- >
4059
- <MockCellItem
4060
- value={1}
4061
- />
4062
- </View>
4063
- <View
4064
- style={null}
4065
- >
4066
- <MockCellItem
4067
- value={2}
4068
- />
4069
- </View>
4070
- <View
4071
- style={null}
4072
- >
4073
- <MockCellItem
4074
- value={3}
4075
- />
4076
- </View>
4077
- <View
4078
- style={null}
4079
- >
4080
- <MockCellItem
4081
- value={4}
4082
- />
4083
- </View>
4084
- <View
4085
- style={null}
4086
- >
4087
- <MockCellItem
4088
- value={5}
4089
- />
4090
- </View>
4091
- <View
4092
- style={null}
4093
- >
4094
- <MockCellItem
4095
- value={6}
4096
- />
4097
- </View>
4098
- <View
4099
- style={null}
4100
- >
4101
- <MockCellItem
4102
- value={7}
4103
- />
4104
- </View>
4105
- <View
4106
- style={null}
4107
- >
4108
- <MockCellItem
4109
- value={8}
4110
- />
4111
- </View>
4112
- <View
4113
- style={null}
4114
- >
4115
- <MockCellItem
4116
- value={9}
4117
- />
4118
- </View>
4119
- <View
4120
- style={
4121
- Object {
4122
- "height": 10,
4123
- }
4124
- }
4125
- />
4126
- </View>
4127
- </RCTScrollView>
4128
- `;
4129
-
4130
- exports[`retains initial render region when an item is appended 1`] = `
4131
- <RCTScrollView
4132
- data={
4133
- Array [
4134
- Object {
4135
- "key": 0,
4136
- },
4137
- Object {
4138
- "key": 1,
4139
- },
4140
- Object {
4141
- "key": 2,
4142
- },
4143
- Object {
4144
- "key": 3,
4145
- },
4146
- Object {
4147
- "key": 4,
4148
- },
4149
- Object {
4150
- "key": 5,
4151
- },
4152
- Object {
4153
- "key": 6,
4154
- },
4155
- Object {
4156
- "key": 7,
4157
- },
4158
- Object {
4159
- "key": 8,
4160
- },
4161
- Object {
4162
- "key": 9,
4163
- },
4164
- Object {
4165
- "key": 10,
4166
- },
4167
- ]
4168
- }
4169
- getItem={[Function]}
4170
- getItemCount={[Function]}
4171
- getItemLayout={[Function]}
4172
- initialNumToRender={3}
4173
- onContentSizeChange={[Function]}
4174
- onLayout={[Function]}
4175
- onMomentumScrollBegin={[Function]}
4176
- onMomentumScrollEnd={[Function]}
4177
- onScroll={[Function]}
4178
- onScrollBeginDrag={[Function]}
4179
- onScrollEndDrag={[Function]}
4180
- renderItem={[Function]}
4181
- scrollEventThrottle={50}
4182
- stickyHeaderIndices={Array []}
4183
- >
4184
- <View>
4185
- <View
4186
- style={null}
4187
- >
4188
- <MockCellItem
4189
- value={0}
4190
- />
4191
- </View>
4192
- <View
4193
- style={null}
4194
- >
4195
- <MockCellItem
4196
- value={1}
4197
- />
4198
- </View>
4199
- <View
4200
- style={null}
4201
- >
4202
- <MockCellItem
4203
- value={2}
4204
- />
4205
- </View>
4206
- <View
4207
- style={
4208
- Object {
4209
- "height": 80,
4210
- }
4211
- }
4212
- />
4213
- </View>
4214
- </RCTScrollView>
4215
- `;
4216
-
4217
- exports[`retains intitial render if initialScrollIndex == 0 1`] = `
4218
- <RCTScrollView
4219
- data={
4220
- Array [
4221
- Object {
4222
- "key": 0,
4223
- },
4224
- Object {
4225
- "key": 1,
4226
- },
4227
- Object {
4228
- "key": 2,
4229
- },
4230
- Object {
4231
- "key": 3,
4232
- },
4233
- Object {
4234
- "key": 4,
4235
- },
4236
- Object {
4237
- "key": 5,
4238
- },
4239
- Object {
4240
- "key": 6,
4241
- },
4242
- Object {
4243
- "key": 7,
4244
- },
4245
- Object {
4246
- "key": 8,
4247
- },
4248
- Object {
4249
- "key": 9,
4250
- },
4251
- Object {
4252
- "key": 10,
4253
- },
4254
- Object {
4255
- "key": 11,
4256
- },
4257
- Object {
4258
- "key": 12,
4259
- },
4260
- Object {
4261
- "key": 13,
4262
- },
4263
- Object {
4264
- "key": 14,
4265
- },
4266
- Object {
4267
- "key": 15,
4268
- },
4269
- Object {
4270
- "key": 16,
4271
- },
4272
- Object {
4273
- "key": 17,
4274
- },
4275
- Object {
4276
- "key": 18,
4277
- },
4278
- Object {
4279
- "key": 19,
4280
- },
4281
- ]
4282
- }
4283
- getItem={[Function]}
4284
- getItemCount={[Function]}
4285
- getItemLayout={[Function]}
4286
- initialNumToRender={5}
4287
- initialScrollIndex={0}
4288
- onContentSizeChange={[Function]}
4289
- onLayout={[Function]}
4290
- onMomentumScrollBegin={[Function]}
4291
- onMomentumScrollEnd={[Function]}
4292
- onScroll={[Function]}
4293
- onScrollBeginDrag={[Function]}
4294
- onScrollEndDrag={[Function]}
4295
- renderItem={[Function]}
4296
- scrollEventThrottle={50}
4297
- stickyHeaderIndices={Array []}
4298
- windowSize={1}
4299
- >
4300
- <View>
4301
- <View
4302
- style={null}
4303
- >
4304
- <MockCellItem
4305
- value={0}
4306
- />
4307
- </View>
4308
- <View
4309
- style={null}
4310
- >
4311
- <MockCellItem
4312
- value={1}
4313
- />
4314
- </View>
4315
- <View
4316
- style={null}
4317
- >
4318
- <MockCellItem
4319
- value={2}
4320
- />
4321
- </View>
4322
- <View
4323
- style={null}
4324
- >
4325
- <MockCellItem
4326
- value={3}
4327
- />
4328
- </View>
4329
- <View
4330
- style={null}
4331
- >
4332
- <MockCellItem
4333
- value={4}
4334
- />
4335
- </View>
4336
- <View
4337
- style={
4338
- Object {
4339
- "height": 40,
4340
- }
4341
- }
4342
- />
4343
- <View
4344
- style={null}
4345
- >
4346
- <MockCellItem
4347
- value={9}
4348
- />
4349
- </View>
4350
- <View
4351
- style={null}
4352
- >
4353
- <MockCellItem
4354
- value={10}
4355
- />
4356
- </View>
4357
- <View
4358
- style={null}
4359
- >
4360
- <MockCellItem
4361
- value={11}
4362
- />
4363
- </View>
4364
- <View
4365
- style={null}
4366
- >
4367
- <MockCellItem
4368
- value={12}
4369
- />
4370
- </View>
4371
- <View
4372
- style={null}
4373
- >
4374
- <MockCellItem
4375
- value={13}
4376
- />
4377
- </View>
4378
- <View
4379
- style={null}
4380
- >
4381
- <MockCellItem
4382
- value={14}
4383
- />
4384
- </View>
4385
- <View
4386
- style={null}
4387
- >
4388
- <MockCellItem
4389
- value={15}
4390
- />
4391
- </View>
4392
- <View
4393
- style={null}
4394
- >
4395
- <MockCellItem
4396
- value={16}
4397
- />
4398
- </View>
4399
- <View
4400
- style={null}
4401
- >
4402
- <MockCellItem
4403
- value={17}
4404
- />
4405
- </View>
4406
- <View
4407
- style={null}
4408
- >
4409
- <MockCellItem
4410
- value={18}
4411
- />
4412
- </View>
4413
- <View
4414
- style={null}
4415
- >
4416
- <MockCellItem
4417
- value={19}
4418
- />
4419
- </View>
4420
- </View>
4421
- </RCTScrollView>
4422
- `;
4423
-
4424
- exports[`unmounts sticky headers moved below viewport 1`] = `
4425
- <RCTScrollView
4426
- data={
4427
- Array [
4428
- Object {
4429
- "key": 0,
4430
- "sticky": true,
4431
- },
4432
- Object {
4433
- "key": 1,
4434
- },
4435
- Object {
4436
- "key": 2,
4437
- },
4438
- Object {
4439
- "key": 3,
4440
- "sticky": true,
4441
- },
4442
- Object {
4443
- "key": 4,
4444
- },
4445
- Object {
4446
- "key": 5,
4447
- },
4448
- Object {
4449
- "key": 6,
4450
- "sticky": true,
4451
- },
4452
- Object {
4453
- "key": 7,
4454
- },
4455
- Object {
4456
- "key": 8,
4457
- },
4458
- Object {
4459
- "key": 9,
4460
- "sticky": true,
4461
- },
4462
- Object {
4463
- "key": 10,
4464
- },
4465
- Object {
4466
- "key": 11,
4467
- },
4468
- Object {
4469
- "key": 12,
4470
- "sticky": true,
4471
- },
4472
- Object {
4473
- "key": 13,
4474
- },
4475
- Object {
4476
- "key": 14,
4477
- },
4478
- Object {
4479
- "key": 15,
4480
- "sticky": true,
4481
- },
4482
- Object {
4483
- "key": 16,
4484
- },
4485
- Object {
4486
- "key": 17,
4487
- },
4488
- Object {
4489
- "key": 18,
4490
- "sticky": true,
4491
- },
4492
- Object {
4493
- "key": 19,
4494
- },
4495
- ]
4496
- }
4497
- getItem={[Function]}
4498
- getItemCount={[Function]}
4499
- getItemLayout={[Function]}
4500
- initialNumToRender={1}
4501
- onContentSizeChange={[Function]}
4502
- onLayout={[Function]}
4503
- onMomentumScrollBegin={[Function]}
4504
- onMomentumScrollEnd={[Function]}
4505
- onScroll={[Function]}
4506
- onScrollBeginDrag={[Function]}
4507
- onScrollEndDrag={[Function]}
4508
- renderItem={[Function]}
4509
- scrollEventThrottle={50}
4510
- stickyHeaderIndices={
4511
- Array [
4512
- 0,
4513
- 3,
4514
- ]
4515
- }
4516
- windowSize={1}
4517
- >
4518
- <View>
4519
- <View
4520
- style={null}
4521
- >
4522
- <MockCellItem
4523
- sticky={true}
4524
- value={0}
4525
- />
4526
- </View>
4527
- <View
4528
- style={null}
4529
- >
4530
- <MockCellItem
4531
- value={1}
4532
- />
4533
- </View>
4534
- <View
4535
- style={null}
4536
- >
4537
- <MockCellItem
4538
- value={2}
4539
- />
4540
- </View>
4541
- <View
4542
- style={null}
4543
- >
4544
- <MockCellItem
4545
- sticky={true}
4546
- value={3}
4547
- />
4548
- </View>
4549
- <View
4550
- style={null}
4551
- >
4552
- <MockCellItem
4553
- value={4}
4554
- />
4555
- </View>
4556
- <View
4557
- style={
4558
- Object {
4559
- "height": 150,
4560
- }
4561
- }
4562
- />
4563
- </View>
4564
- </RCTScrollView>
4565
- `;