Commit Graph

101 Commits

Author SHA1 Message Date
Adam Ernst 9f33fe2583 Upgrade to 1.9.1
Reviewed By: vjeux

Differential Revision: D6497877

fbshipit-source-id: 3b88b96e375ddf1fbe039a0593569bbdde40a2dc
2017-12-06 17:34:26 -08:00
Spencer Ahrens c6fe101cdc export SeparatorsObj type for re-use in ListItems etc.
Differential Revision: D6354300

fbshipit-source-id: 3fd4c86ef1d190fb544f2c6fccb638ffe3ced378
2017-11-29 10:53:51 -08:00
Chris Lewis 22a1419900 Fix $FlowFixMe in Flatlist
Summary:
$FlowFixMe suppressed type validation on _listRef. Add appropriate typing to let Flow succeed when $FlowFixMe is removed.

Not sure what this project's philosophy around ref types is. In some places I've seen them annotated as any rather than trying to get a more granular type to match. I'm open to suggestions.

`yarn flow`

[INTERNAL] [ENHANCEMENT] [FlatList.js] - Remove $FlowFixMe from FlatList
Closes https://github.com/facebook/react-native/pull/16882

Differential Revision: D6386479

Pulled By: hramos

fbshipit-source-id: bed14f2c7071525cb46425ab14214771de0277f3
2017-11-29 09:15:50 -08:00
Logan Daniels d19d137cc1 Fix minimumViewTime in ViewabilityHelper
Reviewed By: sahrens

Differential Revision: D6350352

fbshipit-source-id: e909600875156127eb3144726981ab62e0015e6e
2017-11-16 20:15:46 -08:00
Caleb Meredith eb0d6470e5 Flow 0.59 xplat/js deploy
Reviewed By: avikchaudhuri

Differential Revision: D6300238

fbshipit-source-id: a6839fa2a9bbc50c3832a3f5b1cac2a6d2bd96b7
2017-11-10 21:15:48 -08:00
Miguel Jimenez Esun 16bbd908e7 Update Jest to 21.3.0-beta.8
Reviewed By: davidaurelio

Differential Revision: D6221784

fbshipit-source-id: 189e895378635dd21d14d6fb1f93510a52c90742
2017-11-08 07:03:30 -08:00
Avik Chaudhuri a48da14800 @allow-large-files Flow 0.58 upgrade for xplat/js
Reviewed By: yungsters

Differential Revision: D6219339

fbshipit-source-id: f003111500ef5971b9a95f26d43cee6644c16abe
2017-11-02 10:51:14 -07:00
Miguel Jimenez Esun 834b9d4e6e Adding @email tags to most of the tests
Reviewed By: rafeca

Differential Revision: D6185623

fbshipit-source-id: 30df83288fe85516d8d5a1617a4fb8fea826ed6f
2017-11-02 06:25:03 -07:00
youngjl1 95bf367981 Spelling fix
Summary:
occured > occurred

Improve code comments by fixing a typo.

No code was changed!

Closes https://github.com/facebook/react-native/pull/16558

Differential Revision: D6188381

Pulled By: shergin

fbshipit-source-id: 719a8d3bc9b42877b9b8218de32fc87b8ca8dd7f
2017-10-30 12:36:16 -07:00
Martin Rädlinger 6747a36f5d VirtualizedList: fix bug where onViewableItemsChanged wouldn't trigger
Summary:
In the current implementation of the `VirtualizedList` the `onViewableItemsChanged` callback wouldn't trigger if the underlying list data changes. (see example snack https://snack.expo.io/Hk5703eBb)

I added a method in the `ViewabilityHelper` to invalidate the cached viewableIndices, which gets triggered when the list-data changes.
Closes https://github.com/facebook/react-native/pull/14922

Differential Revision: D5864537

Pulled By: sahrens

fbshipit-source-id: 37f617763596244208548817d5b138dadc12c75d
2017-10-16 04:35:05 -07:00
Paito Anderson 4a2d3e9653 Fixed homogenous typo
Summary: Closes https://github.com/facebook/react-native/pull/16285

Differential Revision: D6048989

Pulled By: hramos

fbshipit-source-id: e6affb221961d14827ff655069571a3dc57197a1
2017-10-13 00:15:42 -07:00
Peter Ruibal e50464d1d7 Unbreak doc generation for SectionList
Reviewed By: hramos

Differential Revision: D6018285

fbshipit-source-id: c21deaaa90627936ce29b0212b06640fa38b82f4
2017-10-10 10:45:47 -07:00
Naman Goel bee33a4400 Improve Flow Types
Differential Revision: D5963184

fbshipit-source-id: 206f0d52b66f4f1af284445b10a8a4ff7b2cc36d
2017-10-04 14:55:34 -07:00
Sam Goldman a16ef18a80 Upgrade Flow to v0.56.0
Reviewed By: calebmer

Differential Revision: D5958715

fbshipit-source-id: 7feda03a9540e69bf8d9b4eb89720248ff43294f
2017-10-02 21:11:05 -07:00
Matt Bruce d3e1a21399 Change all calls to no-console from no-console-disallow
Reviewed By: TheSavior

Differential Revision: D5944700

fbshipit-source-id: cdd78d1b32fa98d8a792a39ccc3cb37241ab4366
2017-09-29 16:38:06 -07:00
Tomas Reimers d8cc6e3c2b Add SwipeableFlatList
Reviewed By: sahrens

Differential Revision: D5912488

fbshipit-source-id: 3d2872a7712c00badcbd8341a7d058df14a9091a
2017-09-28 22:16:08 -07:00
Spencer Ahrens e16b514c5f Add onScrollToIndexFailed support
Summary: Allows handling the case of wanting to scroll beyond the measured window.

Reviewed By: TheSavior

Differential Revision: D5915331

fbshipit-source-id: 329927632f4d04f213567ce4bbe547b04b8ea86d
2017-09-27 18:31:15 -07:00
Christopher Chedeau 70c6700be8 Codemod to 1.7.0
Differential Revision: D5763302

fbshipit-source-id: a91ca1786c7ac8eb9aa3dd43555a7a223dc6f9cf
2017-09-26 23:45:48 -07:00
Taylor Kline 82b4b9b115 Give complex FlatList example more motivation
Summary:
Previously, the example MyListItem never referenced the selected prop, leaving ambiguity about the intention of the demo.

By adding a concrete implementation with coloring based on the selected prop, we can see that this is a demo of a multi-select list for batch actions instead of, say, a click-to-navigate nested list.

Here is a working Snack demo for future reference:
https://snack.expo.io/BkRMRTGB-

References #14872

<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/14957

Differential Revision: D5892186

Pulled By: sahrens

fbshipit-source-id: c7b46b5f6eae8f36bd4bda7cbbd354cc22108b42
2017-09-22 13:04:06 -07:00
Naman Goel 11963d824d Fix Flow errors in ListViewData source.
Differential Revision: D5839414

fbshipit-source-id: 7a0c7b3d27be728c74e08d3a8209deb3ca68dd63
2017-09-19 16:57:41 -07:00
Tomas Reimers ae1a4f08f6 Allow data lists to include 0 or '' (falsey items)
Summary:
Fixing https://github.com/facebook/react-native/issues/13578

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

(Write your motivation here.)

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
Closes https://github.com/facebook/react-native/pull/15419

Reviewed By: sahrens

Differential Revision: D5795844

Pulled By: tomasreimers

fbshipit-source-id: 4cdf97a2f5e83e38f4e12af771b512e7dddd212a
2017-09-13 17:33:03 -07:00
Alexandre Moureaux b45c91d3e7 Fix small typo
Summary:
Hi guys,

A small typo found in the doc :)
Closes https://github.com/facebook/react-native/pull/15888

Differential Revision: D5809251

Pulled By: TheSavior

fbshipit-source-id: 7a2ca8f2cbca81aa2059ee619a8c6087256e39a6
2017-09-11 16:45:44 -07:00
m30do ae60ae4074 fix ItemSeparatorComponent position in horizontal and inverted mode
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

There's a positioning bug in `VirtualizedList` when `ItemSeparatorComponent` is defined for a list in horizontal or inverted mode. And also we face this bug in `FlatList`, because it is using `VirtualizedList` to render lists.
This commit will fix the [#15777](https://github.com/facebook/react-native/issues/15777).

Before fix:
```
<FlatList
  ...
  horizontal={true}
  inverted={true}
  ...
/>
```

![image](https://user-images.githubusercontent.com/15084663/30205251-95f14c70-949d-11e7-85e9-7a3304a52818.png)

```
<FlatList
  ...
  horizontal={true}
  inverted={false}
  ...
/>
```
![image](https://user-images.githubusercontent.com/15084663/30205411-f01d27b4-949d-11e7-991e-00aeae0c01e0.png)

I ran this code with all possible values of `horizontal` and `inverted` props in `FlatList` and `VirtualizedList` and the results of each run was as below:
After fix bug:

```
<FlatList
  ...
  horizontal={true}
  inverted={false}
  ...
/>
```
![image](https://user-images.githubusercontent.com/15084663/30205498-323bcf60-949e-11e7-8ba0-465614ea5cf2.png)

```
<FlatList
  ...
  horizontal={true}
  inverted={true}
  ...
/>
```
![image](https://user-images.githubusercontent.com/15084663/30205543-5274f612-949e-11e7-9660-bbdf8194cd27.png)
Closes https://github.com/facebook/react-native/pull/15865

Differential Revision: D5797266

Pulled By: hramos

fbshipit-source-id: 7d44fa797dbd9e83eb2bdd7833e9dd9707d9d822
2017-09-08 15:06:50 -07:00
Spencer Ahrens f37fc6705a Add snapshot tests for sticky headers
Reviewed By: TheSavior

Differential Revision: D5751337

fbshipit-source-id: d281c1a81c7ec7135686b705c376c90d44218fdc
2017-09-07 13:05:35 -07:00
Marshall Roch 91b6b4efb9 @allow-large-files Flow v0.54.0
Reviewed By: leebyron

Differential Revision: D5773490

fbshipit-source-id: 2c54bb6326f23edbe9a969f3010f79da8189923e
2017-09-06 03:33:43 -07:00
Vince Oppedisano ad733ad430 Extend FlatList to support multiple viewability configs
Summary: FlatList only supports one viewability configuration and callback. This change extends FlatList and VirtualizedList to support multiple viewability configurations and corresponding callbacks.

Reviewed By: sahrens

Differential Revision: D5720860

fbshipit-source-id: 9d24946362fa9001d44d4980c85f7d2627e45a33
2017-09-05 18:51:25 -07:00
Spencer Ahrens 57c7324ab7 Support sticky ListHeaderComponent
Summary: Fixed the little oversight.

Reviewed By: TheSavior

Differential Revision: D5743857

fbshipit-source-id: c61a6c29b5f547f3e5a2b7ff2d318f693cc9aed5
2017-09-01 12:01:35 -07:00
Caleb Meredith 63f990121a Fix React Native open source
Reviewed By: hramos, TheSavior

Differential Revision: D5728356

fbshipit-source-id: fb751d67c16ba9273de93d9b6d5acd65b1555dca
2017-08-29 15:01:05 -07:00
Eli White 2d0fe109d7 Fix Prettier
Reviewed By: hramos

Differential Revision: D5720486

fbshipit-source-id: 374c0c264a714276c39c357aa3fc0737a822a8db
2017-08-29 11:00:59 -07:00
Caleb Meredith 90eaeb019b Upgrade fbsource/xplat/js to Flow v0.53.0
Reviewed By: avikchaudhuri

Differential Revision:
D5648819
Ninja: T20988071

fbshipit-source-id: 66e5b6747c79ae66b6eb69d40ede5e982c26174f
2017-08-17 18:45:01 -07:00
Caleb Meredith 30d9c3d279 Add suppressions for Flow v0.53.0 before React changes
Reviewed By: avikchaudhuri

Differential Revision: D5648801

fbshipit-source-id: c4eb1bee198a177b69b6e9414111ce957b4d27ff
2017-08-17 05:18:33 -07:00
Oleg Lokhvitsky ad21ad2559 Fix stale separator props and expose CellRenderer refs
Reviewed By: sahrens

Differential Revision: D5554920

fbshipit-source-id: 4b6ebc88603afeb642b2860c6069f28cb415d8be
2017-08-08 17:01:39 -07:00
Gant Laborde 2161f92aaf Add pertinent info for fresh flatlisters
Summary:
I just worked with a fellow dev who was switching to flatlist and ended up pretty surprised at the performance drop.  The measurement had an exponential bridge saturation, causing flatlist to lose to a scrollview!

We knew something was up, but a little note in the docs would have helped.
Closes https://github.com/facebook/react-native/pull/15400

Differential Revision: D5579483

Pulled By: sahrens

fbshipit-source-id: 2cc2488b6332db4f4d644c67f180088d3a5874a8
2017-08-07 17:58:42 -07:00
glevi@fb.com f0f1b12d9e @allow-large-files [Flow] Deploy v0.52.0 to xplat
Reviewed By: samwgoldman

Differential Revision: D5548893

fbshipit-source-id: b772423f11ff53f85a29b002226c5581c073f9ff
2017-08-03 08:06:58 -07:00
Luy Tran ccb0899658 add setNativeProps to SectionList
Summary:
```js
componentDidMount() {
  this._list.setNativeProps({scrollEnabled: false})
}

render() {
  const sections = [
    {key: 'foo', data: [{name: 'Jone Doe', key: 'a'}, {name: 'Susan Briz', key: 'b'}],
    {key: 'bar', data: [{name: 'David Mark', key: 'c'}, {name: 'Daniel Campbell', key: 'd'}]
  ]

  return (
    <SectionList
      ref={c => (this._list = c)}
      sections={sections}
      renderItem={({item}) => <Text>{item.name}<Text>}
    />
  )
}
```
Closes https://github.com/facebook/react-native/pull/15328

Differential Revision: D5546636

Pulled By: javache

fbshipit-source-id: 25aec067879be1571db5c3a09b5f0952826220ac
2017-08-02 17:43:40 -07:00
Tim Wang 0e93f4fa29 Fix SectionList examples in documentation
Summary:
Document to change http://facebook.github.io/react-native/releases/next/docs/sectionlist.html

This example is not documented incorrectly.

According to Flow-type in the [source code](https://github.com/facebook/react-native/blob/master/Libraries/Lists/SectionList.js#L25-L52) the `title` is not required and the `renderItem` method takes wrong `item.title` for rendering in example. See https://github.com/facebook/react-native/pull/15234#issuecomment-318555336

![screen shot 2017-07-28 at 12 24 03 pm](https://user-images.githubusercontent.com/8013313/28702472-b72d160a-738f-11e7-96ba-dcd7e8ce4ff2.png)
Closes https://github.com/facebook/react-native/pull/15234

Differential Revision: D5518721

Pulled By: hramos

fbshipit-source-id: 4effe3778aac09a0807acc8a002e588ea2d723f9
2017-07-28 12:49:01 -07:00
Garrett McCullough 8117fa16c9 Improve the documentation for ListView and ListViewDataSource
Summary:
What existing problem does the pull request solve?
My motivation was to improve the documentation for ListView and ListViewDataSource because I always have trouble remembering how they work and the documentation was lacking an example for `cloneWithRowsAndSections`

My PR does the following:
* add a note about how headers and footers are rendered on a horizontal ListView
* fix a typo in an example
* clarify that the sectionIdentities should match the keys or array indexes of the data source
* add an example of cloneWithRowsAndSections
* add notes on the return values of `getRowCount` and `getRowAndSectionCount`

n/a; documentation only

![screenshot of ListViewDataSource changes](https://cloud.githubusercontent.com/assets/580060/25768881/d339544a-31c1-11e7-88a1-5e60bc008500.png)
Closes https://github.com/facebook/react-native/pull/13811

Differential Revision: D5473192

Pulled By: hramos

fbshipit-source-id: f31fc6edfdeb8dff75d39bbcceda06fd839df934
2017-07-21 14:31:17 -07:00
JSON Deppen af48b4855b Remove typo
Summary:
<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15089

Differential Revision: D5448987

Pulled By: shergin

fbshipit-source-id: eb240517dc94475744f1bda2652f8aff994c0bcd
2017-07-18 17:46:33 -07:00
Tomas Reimers c694212be3 FlatList doesn't specify that it accepts ScrollView Props
Summary:
ListView does specify this: https://facebook.github.io/react-native/docs/listview.html#props

The link in ListView is generated by the documentation generator, but because the format of FlatList's props is different, it fails to catch it. Consider finding a way to specify this explicitly to the documentation generator (although this would be a bigger change).

<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/14891

Differential Revision: D5386036

Pulled By: sahrens

fbshipit-source-id: 0b8a685411507cc4d0b781fd39b792d59614ce52
2017-07-18 11:16:46 -07:00
Dean G cb9b266b8e Update sectionList keyExtractor docs
Summary:
Added language to explain that you still need to add keys for each section even if you use a keyExtractor method.

No code changed; just clarified documentation.
Closes https://github.com/facebook/react-native/pull/15007

Differential Revision: D5425897

Pulled By: hramos

fbshipit-source-id: db44064a28a673feeda5a6765ea45217d3ae51e2
2017-07-14 13:23:21 -07:00
Maarten Schumacher cad2d9b072 Be able to scroll to last item in list
Summary:
The invariant condition doesn't allow scrolling to the last index

Here is a simple reproduction of the problem: https://snack.expo.io/BJ59gzWrZ

Surely, if the last item is rendered, we should be able to scroll to it without an invariant failing?

Tested locally that this change fixes the issue.
Closes https://github.com/facebook/react-native/pull/14934

Differential Revision: D5414535

Pulled By: shergin

fbshipit-source-id: 38dac4c0e2ae5e1e199a67ca0e98e8f7325e77f4
2017-07-13 00:03:51 -07:00
Eli White 10230707cb Enforce Prettier for @format
Reviewed By: zertosh

Differential Revision: D5392376

fbshipit-source-id: 6f09a4d8f4542c3a74aadb8d62fd216529a4f2bc
2017-07-10 15:37:36 -07:00
Seth Fitzsimmons 9afb71fde8 Replace React.createClass with create-react-class
Summary:
This replaces all uses of `React.createClass` with `createReactClass` from the `create-react-class` package, attempting to match use of `var` and `const` according to local style.

Fixes #14620
Refs #14712
Closes https://github.com/facebook/react-native/pull/14729

Differential Revision: D5321810

Pulled By: hramos

fbshipit-source-id: ae7b40640b2773fd89c3fb727ec87f688bebf585
2017-07-07 14:36:01 -07:00
superyarik f8ae461bc1 Update FlatList.js
Summary:
<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/14764

Differential Revision: D5375730

Pulled By: javache

fbshipit-source-id: 776db77c4dc681edef5832552b220197225e9d3f
2017-07-06 14:34:45 -07:00
Spencer Ahrens 2c9e113f8e Add ListView deprecation message to docs
Summary:
Could have sworn we put this in a while ago...
Closes https://github.com/facebook/react-native/pull/14870

Differential Revision: D5376747

Pulled By: sahrens

fbshipit-source-id: d2bf3efea205defa48d6cd7f853739f17eb39ece
2017-07-06 11:51:32 -07:00
Christopher Chedeau c848c3820b Codemod prettier to 1.5.2
Differential Revision: D5339725

fbshipit-source-id: 631338436a7d69b0ab0721507bdab4ae4e207065
2017-06-28 12:50:30 -07:00
Mike Lambert 1ee602b655 Fix problems if _updateCellsToRender gets called too early
Summary:
(prior to the scroll metrics being set up, or prior to the view being scrolled to the right location).

I'm using a StackNavigator to push a FlatList secondary screen, and it was causing extraneous rendering (item X ->item 0 -> item X)

I've logged inside the render functions of my `renderItem` function, and verified that it no longer attempts to render item 0 anymore. And I've verified from the `VirtualizedList.state` no longer renders a `{first: 0, last: 0}`, but persistently stays at `{first: X, last: X}` from start until things stabilize.
Closes https://github.com/facebook/react-native/pull/14562

Reviewed By: bvaughn

Differential Revision: D5283771

Pulled By: sahrens

fbshipit-source-id: 0f70ac0b89922449bd20bfa69edbc8939eafdf1f
2017-06-22 18:48:19 -07:00
Jan Söndermann 4429a8dde6 Fix typo
Summary: Closes https://github.com/facebook/react-native/pull/14676

Differential Revision: D5301501

Pulled By: javache

fbshipit-source-id: e9527031a728f2ccc422ef5664b6b8d613c9583f
2017-06-22 11:16:17 -07:00
zongwan d217921b5e Update VirtualizedList.js, fix wrong position after scrollToEnd when props.refreshing === true
Summary:
Pull request again for clean branch

Thanks for submitting a PR! Please read these instructions carefully:

- [x] Explain the **motivation** for making this change.
- [x] Provide a **test plan** demonstrating that the code is solid.
- [x] Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch, NOT a "stable" branch.

What existing problem does the pull request solve?
Fix #14033
Fix wrong position after `scrollToEnd` when `props.refreshing === true`

**Before**

![before](https://cloud.githubusercontent.com/assets/1185694/26242273/657f0180-3cba-11e7-9360-49269fd1bb2f.gif)

**After**

![after](https://cloud.githubusercontent.com/assets/1185694/26242503/465a856c-3cbb-11e7-98fb-f3256fd45c15.gif)

Sign the [CLA][2], if you haven't already.

Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

Make sure all **tests pass** on both [Travis][3] and [Circle CI][4]. PRs that break tests are unlikely to be merged.

For more info, see the ["Pull Requests"][5] section of our "Contributing" guidelines.

[1]: https://medium.com/martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
[2]: https://code.facebook.com/cla
[3]: https://travis-ci.org/facebook/react-native
[4]: http://circleci.com/gh/facebook/react-native
[5]: https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#pull-requests
Closes https://github.com/facebook/react-native/pull/14089

Differential Revision: D5283973

Pulled By: sahrens

fbshipit-source-id: 9bef9a922c15aa5bed11a59acbd7b48a76946d29
2017-06-20 19:01:27 -07:00
Janic Duplessis a2b0ee0fc3 FlatList - Add dev validation of the object returned by getItemLayout
Summary:
Returning an object that doesn't have all the required properties from `getItemLayout` doesn't cause a flow error (maybe because we are using `createAnimatedComponent`) and caused ALL items to be rendered which caused perf issues that were hard to debug (typo lenght -> length -_-). This adds a simple warning in DEV mode using checkPropTypes.

**Test plan**
Tested in RNTester by passing a bad `getItemLayout` function.
![image](https://cloud.githubusercontent.com/assets/2677334/26329030/5b32ba90-3f13-11e7-9190-08f05a5c0682.png)
Closes https://github.com/facebook/react-native/pull/14111

Differential Revision: D5283942

Pulled By: sahrens

fbshipit-source-id: 8909532dfddd8628b7fb3380c198f0dfa88f240a
2017-06-20 10:45:32 -07:00