Skip to content

Commit

Permalink
fix(iOS): Call dispatchViewManagerCommand with correct number of argu…
Browse files Browse the repository at this point in the history
…ments (#886)
  • Loading branch information
cozmo authored and Titozzz committed Sep 21, 2019
1 parent d25b20a commit 33f1ee3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/WebView.android.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,15 @@ class WebView extends React.Component<AndroidWebViewProps, State> {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
this.getCommands().goForward,
undefined
);
};

goBack = () => {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
this.getCommands().goBack,
undefined
);
};

Expand All @@ -90,20 +92,23 @@ class WebView extends React.Component<AndroidWebViewProps, State> {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
this.getCommands().reload,
undefined
);
};

stopLoading = () => {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
this.getCommands().stopLoading,
undefined
);
};

requestFocus = () => {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
this.getCommands().requestFocus,
undefined
);
};

Expand Down
5 changes: 5 additions & 0 deletions src/WebView.ios.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class WebView extends React.Component<IOSWebViewProps, State> {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
this.getCommands().goForward,
undefined,
);
};

Expand All @@ -92,6 +93,7 @@ class WebView extends React.Component<IOSWebViewProps, State> {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
this.getCommands().goBack,
undefined,
);
};

Expand All @@ -103,6 +105,7 @@ class WebView extends React.Component<IOSWebViewProps, State> {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
this.getCommands().reload,
undefined,
);
};

Expand All @@ -113,6 +116,7 @@ class WebView extends React.Component<IOSWebViewProps, State> {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
this.getCommands().stopLoading,
undefined,
);
};

Expand All @@ -123,6 +127,7 @@ class WebView extends React.Component<IOSWebViewProps, State> {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
this.getCommands().requestFocus,
undefined,
);
};

Expand Down

0 comments on commit 33f1ee3

Please sign in to comment.