Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated WebView library (the one being used is gonna be removed) and iOS error #96

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 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 All @@ -79,6 +79,7 @@ class ChartWeb extends Component {
return (
<View style={this.props.style}>
<WebView
originWhitelist={["file://"]}
onLayout={this.reRenderWebView}
style={styles.full}
source={{ html: concatHTML, baseUrl: 'web/' }}
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-highcharts",
"version": "1.1",
"version": "1.1.0",
"description":
"JavaScript implementation of a view container that can flip between its front and back, where the back has a console.log and the front is your aplication.",
"main": "react-native-highcharts.js",
Expand All @@ -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"
}
}
5 changes: 3 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 All @@ -79,6 +79,7 @@ class ChartWeb extends Component {
return (
<View style={this.props.style}>
<WebView
originWhitelist={["file://"]}
onLayout={this.reRenderWebView}
style={styles.full}
source={{ html: concatHTML, baseUrl: 'web/' }}
Expand Down