@office-iss/react-native-win32 0.68.0 → 0.69.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 (180) hide show
  1. package/.flowconfig +1 -3
  2. package/CHANGELOG.json +356 -32
  3. package/CHANGELOG.md +150 -19
  4. package/IntegrationTests/BUCK +4 -1
  5. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +7 -0
  6. package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +1 -0
  7. package/Libraries/Alert/Alert.win32.js +1 -1
  8. package/Libraries/Animated/AnimatedImplementation.js +1 -1
  9. package/Libraries/Animated/NativeAnimatedHelper.js +55 -9
  10. package/Libraries/Animated/NativeAnimatedModule.js +1 -0
  11. package/Libraries/Animated/NativeAnimatedTurboModule.js +1 -0
  12. package/Libraries/Animated/animations/TimingAnimation.js +6 -11
  13. package/Libraries/Animated/createAnimatedComponent.js +2 -2
  14. package/Libraries/Animated/nodes/AnimatedColor.js +95 -29
  15. package/Libraries/Animated/nodes/AnimatedInterpolation.js +19 -22
  16. package/Libraries/Animated/nodes/AnimatedNode.js +2 -2
  17. package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
  18. package/Libraries/AppState/AppState.js +1 -1
  19. package/Libraries/Blob/URL.js +7 -1
  20. package/Libraries/Components/Button.js +3 -0
  21. package/Libraries/Components/DatePickerAndroid/NativeDatePickerAndroid.js +5 -0
  22. package/Libraries/Components/Pressable/Pressable.js +3 -3
  23. package/Libraries/Components/Pressable/Pressable.win32.js +3 -3
  24. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +47 -38
  25. package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +15 -7
  26. package/Libraries/Components/ScrollView/ScrollView.js +1 -1
  27. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +16 -3
  28. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +3 -1
  29. package/Libraries/Components/Slider/Slider.js +0 -2
  30. package/Libraries/Components/Slider/SliderNativeComponent.js +0 -1
  31. package/Libraries/Components/StatusBar/StatusBar.js +6 -1
  32. package/Libraries/Components/Switch/Switch.js +11 -1
  33. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +114 -109
  34. package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +17 -9
  35. package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +13 -5
  36. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +10 -0
  37. package/Libraries/Components/TextInput/TextInput.js +1 -8
  38. package/Libraries/Components/TextInput/TextInputState.js +10 -2
  39. package/Libraries/Components/TextInput/TextInputState.win32.js +10 -2
  40. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
  41. package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
  42. package/Libraries/Components/Touchable/TouchableHighlight.js +1 -0
  43. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -0
  44. package/Libraries/Components/Touchable/TouchableOpacity.js +7 -1
  45. package/Libraries/Components/Touchable/TouchableWin32.Props.d.ts +3 -1
  46. package/Libraries/Components/Touchable/TouchableWin32.Props.js.map +1 -1
  47. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +2 -0
  48. package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
  49. package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +1 -0
  50. package/Libraries/Components/View/View.win32.js +33 -1
  51. package/Libraries/Components/View/ViewNativeComponent.js +68 -8
  52. package/Libraries/Components/View/ViewPropTypes.js +36 -4
  53. package/Libraries/Components/View/ViewPropTypes.win32.js +36 -4
  54. package/Libraries/Components/View/ViewWin32.Props.d.ts +1 -1
  55. package/Libraries/Components/View/ViewWin32.Props.js.map +1 -1
  56. package/Libraries/Core/Devtools/parseHermesStack.js +1 -1
  57. package/Libraries/Core/ExceptionsManager.js +1 -1
  58. package/Libraries/Core/RawEventEmitter.js +38 -0
  59. package/Libraries/Core/ReactNativeVersion.js +2 -2
  60. package/Libraries/Core/polyfillPromise.js +32 -0
  61. package/Libraries/Core/setUpReactDevTools.js +3 -2
  62. package/Libraries/EventEmitter/NativeEventEmitter.js +3 -3
  63. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +2 -1
  64. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +3 -3
  65. package/Libraries/Events/CustomEvent.js +32 -0
  66. package/Libraries/Events/EventPolyfill.js +239 -0
  67. package/Libraries/Image/Image.android.js +0 -6
  68. package/Libraries/Image/Image.ios.js +0 -6
  69. package/Libraries/Image/Image.win32.js +2 -8
  70. package/Libraries/Image/ImageViewNativeComponent.js +18 -3
  71. package/Libraries/Image/TextInlineImageNativeComponent.js +23 -15
  72. package/Libraries/Image/resolveAssetSource.win32.js +1 -1
  73. package/Libraries/Inspector/Inspector.js +2 -4
  74. package/Libraries/Inspector/Inspector.win32.js +7 -9
  75. package/Libraries/Interaction/BridgeSpyStallHandler.js +4 -3
  76. package/Libraries/Interaction/InteractionManager.js +1 -12
  77. package/Libraries/Interaction/TaskQueue.js +5 -4
  78. package/Libraries/LayoutAnimation/LayoutAnimation.js +13 -0
  79. package/Libraries/Linking/Linking.js +1 -1
  80. package/Libraries/Lists/FlatList.js +27 -6
  81. package/Libraries/Lists/VirtualizedList.js +71 -55
  82. package/Libraries/Lists/VirtualizedListContext.js +7 -3
  83. package/Libraries/Lists/VirtualizedSectionList.js +2 -2
  84. package/Libraries/Lists/__tests__/{FillRateHelper-test.windows.js → FillRateHelper-test.js} +2 -2
  85. package/Libraries/Lists/__tests__/{FlatList-test.windows.js → FlatList-test.js} +2 -2
  86. package/Libraries/Lists/__tests__/{SectionList-test.windows.js → SectionList-test.js} +14 -14
  87. package/Libraries/Lists/__tests__/{VirtualizeUtils-test.windows.js → VirtualizeUtils-test.js} +3 -3
  88. package/Libraries/Lists/__tests__/{VirtualizedList-test.windows.js → VirtualizedList-test.js} +92 -43
  89. package/Libraries/Lists/__tests__/{VirtualizedSectionList-test.windows.js → VirtualizedSectionList-test.js} +16 -14
  90. package/Libraries/LogBox/Data/LogBoxData.js +2 -2
  91. package/Libraries/LogBox/Data/LogBoxLog.js +1 -1
  92. package/Libraries/LogBox/Data/LogBoxSymbolication.js +1 -1
  93. package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
  94. package/Libraries/LogBox/LogBox.js +2 -21
  95. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +1 -0
  96. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +2 -1
  97. package/Libraries/NativeComponent/BaseViewConfig.android.js +295 -0
  98. package/Libraries/NativeComponent/BaseViewConfig.ios.js +333 -0
  99. package/Libraries/NativeComponent/BaseViewConfig.win32.js +334 -0
  100. package/Libraries/NativeComponent/NativeComponentRegistry.js +0 -2
  101. package/Libraries/NativeComponent/PlatformBaseViewConfig.js +24 -0
  102. package/Libraries/NativeComponent/StaticViewConfigValidator.js +7 -42
  103. package/Libraries/NativeComponent/ViewConfig.js +4 -4
  104. package/Libraries/NativeComponent/ViewConfigIgnore.js +54 -0
  105. package/Libraries/Network/FormData.js +7 -1
  106. package/Libraries/Network/RCTNetworking.win32.js +1 -1
  107. package/Libraries/Pressability/Pressability.js +115 -46
  108. package/Libraries/Pressability/Pressability.win32.js +174 -69
  109. package/Libraries/Pressability/PressabilityDebug.js +5 -9
  110. package/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js +1 -0
  111. package/Libraries/ReactNative/AppContainer.js +1 -1
  112. package/Libraries/ReactNative/{DummyUIManager.js → BridgelessUIManager.js} +62 -40
  113. package/Libraries/ReactNative/PaperUIManager.win32.js +5 -5
  114. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +39 -0
  115. package/Libraries/ReactNative/UIManager.js +2 -3
  116. package/Libraries/ReactNative/renderApplication.js +4 -0
  117. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +8 -0
  118. package/Libraries/Renderer/implementations/ReactFabric-dev.js +5908 -4906
  119. package/Libraries/Renderer/implementations/ReactFabric-prod.js +2100 -1918
  120. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +2567 -2352
  121. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5610 -4844
  122. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +1710 -1556
  123. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +1830 -1639
  124. package/Libraries/Renderer/shims/ReactNativeTypes.js +2 -1
  125. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +2 -1
  126. package/Libraries/StyleSheet/EdgeInsetsPropType.js +4 -1
  127. package/Libraries/StyleSheet/StyleSheetTypes.js +59 -66
  128. package/Libraries/StyleSheet/normalizeColor.js +1 -1
  129. package/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.js +15 -0
  130. package/Libraries/StyleSheet/private/_TransformStyle.js +53 -0
  131. package/Libraries/Text/Text.js +13 -7
  132. package/Libraries/Text/TextNativeComponent.js +2 -0
  133. package/Libraries/Text/TextNativeComponent.win32.js +2 -0
  134. package/Libraries/Text/TextProps.js +10 -0
  135. package/Libraries/Types/CoreEventTypes.js +13 -1
  136. package/Libraries/Types/CoreEventTypes.win32.js +26 -1
  137. package/Libraries/Utilities/Appearance.js +0 -8
  138. package/Libraries/Utilities/HMRClient.js +1 -1
  139. package/Libraries/Utilities/ReactNativeTestTools.js +1 -0
  140. package/Libraries/Utilities/codegenNativeComponent.js +17 -6
  141. package/Libraries/Utilities/stringifySafe.js +4 -1
  142. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +3 -3
  143. package/Libraries/WebSocket/WebSocket.js +1 -1
  144. package/Libraries/vendor/emitter/_EmitterSubscription.js +1 -1
  145. package/Libraries/vendor/emitter/_EventEmitter.js +1 -1
  146. package/Libraries/vendor/emitter/_EventSubscription.js +1 -1
  147. package/index.js +30 -25
  148. package/index.win32.js +30 -25
  149. package/jest/preprocessor.js +24 -107
  150. package/jest/preprocessor_DO_NOT_USE.js +122 -0
  151. package/metro.config.js +3 -47
  152. package/overrides.json +39 -46
  153. package/package.json +30 -29
  154. package/rntypes/index.d.ts +19 -7
  155. package/src/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +1 -1
  156. package/src/Libraries/Components/Touchable/TouchableWin32.Props.tsx +3 -1
  157. package/src/Libraries/Components/View/ViewWin32.Props.ts +1 -0
  158. package/src/Libraries/Lists/__tests__/__snapshots__/FlatList-test.js.snap +427 -0
  159. package/src/Libraries/Lists/__tests__/__snapshots__/SectionList-test.js.snap +391 -0
  160. package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizeUtils-test.js.snap +3 -0
  161. package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizedList-test.js.snap +4565 -0
  162. package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizedSectionList-test.js.snap +1153 -0
  163. package/src/rntypes/index.d.ts +19 -7
  164. package/typings-index.js +5 -1
  165. package/typings-index.js.map +1 -1
  166. package/Libraries/Components/SegmentedControlIOS/RCTSegmentedControlNativeComponent.js +0 -44
  167. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.android.js +0 -45
  168. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js +0 -123
  169. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.js +0 -45
  170. package/Libraries/Components/View/ReactNativeViewViewConfig.js +0 -360
  171. package/Libraries/Components/View/ReactNativeViewViewConfig.win32.js +0 -401
  172. package/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js +0 -83
  173. package/Libraries/ReactNative/UIManagerInjection.js +0 -15
  174. package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +0 -24527
  175. package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +0 -8309
  176. package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +0 -8961
  177. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +0 -24948
  178. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +0 -8400
  179. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +0 -9049
  180. package/flow/Promise.js +0 -47
@@ -0,0 +1,4565 @@
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
+ `;