Tim 720e19525e Picker (android): Convert children to an array before accessing with a position
Summary:
When using the following component, `this.props.children` is not a flat array.

``` js
class Example extends Component {
    // ...

    render() {
        const values = ['1', '2'];

        return (
            <Picker
                value={this.state.value}
                onValueChange={this.onValueChange.bind(this)}
            >
                <Picker.Item
                    label="n/a"
                    value={null}
                />

                {values.map(value => {
                    return (
                        <Picker.Item
                            label={value}
                            value={value}
                        />
                    );
                })}
            </Picker>
        );
    }
}
```

The resulting `this.props.children` is:

``` js
[
    (child),
    [
        (child),
        (child),
    ],
];
```

Therefor you can't use `this.props.children[2]` to get the last item.

The Android version of the [Picker](https://facebook.github.io/react-native/do
Closes https://github.com/facebook/react-native/pull/8153

Differential Revision: D4753480

Pulled By: javache

fbshipit-source-id: deb0264746b39303e66c69c191af0c962db39085
2017-03-23 06:16:51 -07:00
..
2016-11-04 05:43:44 -07:00
2017-03-04 19:30:34 -08:00
2016-11-04 05:43:44 -07:00
2017-03-04 19:30:34 -08:00
2016-11-04 05:43:44 -07:00
2017-03-04 19:30:34 -08:00
2017-03-04 19:30:34 -08:00
2017-03-21 22:30:30 -07:00
2017-03-04 19:30:34 -08:00
2017-03-04 19:30:34 -08:00
2017-03-01 13:32:16 -08:00
2017-03-04 19:30:34 -08:00
2017-03-06 10:10:11 -08:00
2016-11-04 05:43:44 -07:00
2016-10-16 04:13:42 -07:00