Skip to content

Commit

Permalink
Updated webview import
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernardo Amaral committed Apr 15, 2019
1 parent 1c45360 commit 86ce7bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {
StyleSheet,
Text,
View,
WebView,
Image,
Dimensions
} from 'react-native';
import { WebView } from 'react-native-webview';

const win = Dimensions.get('window');
class ChartWeb extends Component {
Expand Down Expand Up @@ -60,7 +60,7 @@ class ChartWeb extends Component {
}

// used to resize on orientation of display
reRenderWebView(e) {
reRenderWebView = (e) => {
this.setState({
height: e.nativeEvent.layout.height,
width: e.nativeEvent.layout.width,
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@
"bugs": {
"url": "https://github.com/TradingPal/react-native-highcharts/issues"
},
"homepage": "https://github.com/TradingPal/react-native-highcharts#readme"
"homepage": "https://github.com/TradingPal/react-native-highcharts#readme",
"dependencies": {
"react-native-webview": "^5.6.2"
}
}
4 changes: 2 additions & 2 deletions react-native-highcharts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {
StyleSheet,
Text,
View,
WebView,
Image,
Dimensions
} from 'react-native';
import { WebView } from 'react-native-webview';

const win = Dimensions.get('window');
class ChartWeb extends Component {
Expand Down Expand Up @@ -60,7 +60,7 @@ class ChartWeb extends Component {
}

// used to resize on orientation of display
reRenderWebView(e) {
reRenderWebView = (e) => {
this.setState({
height: e.nativeEvent.layout.height,
width: e.nativeEvent.layout.width,
Expand Down

0 comments on commit 86ce7bf

Please sign in to comment.