Updates from Fri 10 Apr

- Implemented response headers when using `XMLHttpRequest` | Nick Lockwood
- [ReactNative] Don't redbox on flow config errors | Spencer Ahrens
- [ReactNative] Fix suggestions in TextInput when setting value prop | Spencer Ahrens
- Link LinkingIOS in SampleApp | Nick Lockwood
- unify use of password and secureTextEntry for TextInput | Nick Lockwood
- Added random js queue+execution time sampling in react native | Bryce Redd
- [react_native] JS files from D1980312:     [react_native] Fix webview | Andrei Coman
- [react-packager] Correct module extension regexp | Amjad Masad
- [react-packager] Implement the browser field package.json spec | Amjad Masad
- [ReactNative] Bring back crash reporting | Alex Kotliarskyi
- Remove duplicate word | Nick Lockwood
- NavigatorIOS navigationBarHidden property support | Nick Lockwood
- [Scroll] Include content insets in scroll events | Nick Lockwood
This commit is contained in:
Amjad Masad
2015-04-10 01:33:10 -07:00
parent 7047d6e191
commit 096f1d9c4c
25 changed files with 608 additions and 128 deletions

View File

@@ -34,8 +34,8 @@ var WebViewState = keyMirror({
var WebView = React.createClass({
propTypes: {
renderError: PropTypes.func.isRequired, // view to show if there's an error
renderLoading: PropTypes.func.isRequired, // loading indicator to show
renderError: PropTypes.func, // view to show if there's an error
renderLoading: PropTypes.func, // loading indicator to show
url: PropTypes.string.isRequired,
automaticallyAdjustContentInsets: PropTypes.bool,
contentInset: EdgeInsetsPropType,
@@ -66,10 +66,10 @@ var WebView = React.createClass({
var otherView = null;
if (this.state.viewState === WebViewState.LOADING) {
otherView = this.props.renderLoading();
otherView = this.props.renderLoading && this.props.renderLoading();
} else if (this.state.viewState === WebViewState.ERROR) {
var errorEvent = this.state.lastErrorEvent;
otherView = this.props.renderError(
otherView = this.props.renderError && this.props.renderError(
errorEvent.domain,
errorEvent.code,
errorEvent.description);