last test
This commit is contained in:
parent
bee15de552
commit
96334d31ed
|
@ -254,18 +254,14 @@ class WebView extends React.Component<AndroidWebViewProps, State> {
|
|||
webViewStyles.push(styles.hidden);
|
||||
}
|
||||
|
||||
if (
|
||||
(source as WebViewUriSource).method === 'POST'
|
||||
&& (source as WebViewUriSource).headers
|
||||
) {
|
||||
console.warn(
|
||||
'WebView: `source.headers` is not supported when using POST.',
|
||||
);
|
||||
} else if (
|
||||
(source as WebViewUriSource).method === 'GET'
|
||||
&& (source as WebViewUriSource).body
|
||||
) {
|
||||
console.warn('WebView: `source.body` is not supported when using GET.');
|
||||
if (source && 'method' in source) {
|
||||
if (source.method === 'POST' && source.headers) {
|
||||
console.warn(
|
||||
'WebView: `source.headers` is not supported when using POST.',
|
||||
);
|
||||
} else if (source.method === 'GET' && source.body) {
|
||||
console.warn('WebView: `source.body` is not supported when using GET.');
|
||||
}
|
||||
}
|
||||
|
||||
const NativeWebView
|
||||
|
@ -280,8 +276,8 @@ class WebView extends React.Component<AndroidWebViewProps, State> {
|
|||
|
||||
const webView = (
|
||||
<NativeWebView
|
||||
{...otherProps}
|
||||
key="webViewKey"
|
||||
{...otherProps}
|
||||
messagingEnabled={typeof onMessage === 'function'}
|
||||
onLoadingError={this.onLoadingError}
|
||||
onLoadingFinish={this.onLoadingFinish}
|
||||
|
|
|
@ -391,9 +391,9 @@ class WebView extends React.Component<IOSWebViewProps, State> {
|
|||
|
||||
const webView = (
|
||||
<NativeWebView
|
||||
key="webViewKey"
|
||||
{...otherProps}
|
||||
decelerationRate={decelerationRate}
|
||||
key="webViewKey"
|
||||
messagingEnabled={typeof onMessage === 'function'}
|
||||
onLoadingError={this.onLoadingError}
|
||||
onLoadingFinish={this.onLoadingFinish}
|
||||
|
|
|
@ -3,9 +3,7 @@
|
|||
import { ReactElement, Component } from 'react';
|
||||
import {
|
||||
NativeSyntheticEvent,
|
||||
ViewStyle,
|
||||
ViewProps,
|
||||
StyleProp,
|
||||
NativeMethodsMixin,
|
||||
Constructor,
|
||||
UIManagerStatic,
|
||||
|
@ -619,6 +617,4 @@ export interface WebViewSharedProps extends ViewProps {
|
|||
* Should caching be enabled. Default is true.
|
||||
*/
|
||||
cacheEnabled?: boolean;
|
||||
|
||||
style?: StyleProp<ViewStyle>;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue