Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.
find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.
Reviewed By: TheSavior, yungsters
Differential Revision: D7007050
fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
Summary:
react@16 (a peerDependency) did away with the PropTypes export in favor of the prop-types module.
This updates all of the remaining references to `React.PropTypes`.
Closes https://github.com/facebook/react-native/pull/14641
Differential Revision: D5287167
Pulled By: javache
fbshipit-source-id: a917e29aa0e5470260568995dfe97f5528ec265e
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
Summary:
Hi!
I found problem with accessibilityLabel on PickerAndroid.
There's no value in content-desc attribute while accessibilityLabel is correct.
I found that accessibilityLabel is not propagated into native components via
native props.
This PR brings accessibilityLabel for PickerAndroid.
Without this solution my appium tests fails, for example:
My code:
```jsx
<Picker
style={this.props.style}
selectedValue={this.props.value}
onValueChange={this.onChange}
disabled={this.props.disabled}
accessibilityLabel="select_wineType">
// Chilren
</Picker>
```
```sh
✖ Error: element (~select_wineType) still not visible after 5000ms
```
Because xml of this view is (look into content-desc of Spinner):
```xml
<android.widget.Spinner index="0" text="" class="android.widget.Spinner" package="com.hello_github" content-desc="" checkable="false" checked="false" clickable="true" enabled="true" focusable="true" focused="false" scrollable="true" long-clickable="false" password=
Closes https://github.com/facebook/react-native/pull/8873
Differential Revision: D3831691
Pulled By: spicyj
fbshipit-source-id: a494f22cb8be8cd6964981fe7ef7d9ff3773bcce
Summary: This removes `node_modules/react` from the list of directories that are used for haste module resolutions. Modules required from React are now imported with `require('react/lib/…')`.
Reviewed By: astreet
Differential Revision: D3509863
fbshipit-source-id: 32cd34e2b8496f0a6676dbe6bb1eacc18124c01e
Summary:According to the [docs](http://facebook.github.io/react-native/releases/0.20/docs/picker.html#onvaluechange), `Picker`'s `onValueChange` should be called with `itemValue` and `itemPosition` but currently only `itemValue` is passed. This PR fixes that.
The position is passed as the 2nd parameter to not introduce any breaking change, and also to respect the current documentation.
The documentation doesn't need to be changed as it will be correct with this PR, but maybe it needs to be updated until this is merged?
Closes https://github.com/facebook/react-native/pull/5874
Differential Revision: D2953936
Pulled By: nicklockwood
fb-gh-sync-id: b8c1283013d4c7ed315066d8750f601f76f6bbb2
shipit-source-id: b8c1283013d4c7ed315066d8750f601f76f6bbb2
Summary:
The basic API is consistent with iOS; there are several platform-specific props.
Also fixed the flickering when a value is selected.
public
Reviewed By: bestander
Differential Revision: D2871092
fb-gh-sync-id: f5cdf6858cb7344b28ee46954cb6b0a3b144b646