react-native-highcharts icon indicating copy to clipboard operation
react-native-highcharts copied to clipboard

events not fire

Open windydang26 opened this issue 7 years ago • 8 comments

i cannot catch event. someone any suggest?

windydang26 avatar Dec 25 '17 09:12 windydang26

events to native code?

salujaharkirat avatar Dec 27 '17 08:12 salujaharkirat

yes! i'm using react-native. events still running, but seem is web enviroment. i cannot consolog, only alert() as web. how to transmission params of hightchart to component?

windydang26 avatar Dec 27 '17 08:12 windydang26

Webview component injects a function called postMessage in your webview html when you pass onMessage prop to it. You can use this postMessage to fire events from webview.

You can try something like this https://snack.expo.io/Bycv3CnMz

salujaharkirat avatar Dec 27 '17 09:12 salujaharkirat

oh! thank you very much! i will try it :)

windydang26 avatar Dec 27 '17 09:12 windydang26

@jinxac Webview component in library not contain onMessage props. i fork repo and edit but cannot fire onMessage. i want to fire event to receiver data point when click in highchart? are you have other idea? thank.

windydang26 avatar Dec 28 '17 06:12 windydang26

are u trying this on android @windydang26 ?

salujaharkirat avatar Dec 28 '17 07:12 salujaharkirat

so sorry. i forget method window.postMessage. after i use postMessage to send data and onMessage to receiver data as you told. i fired events. hi. thank you @jinxac :)

windydang26 avatar Dec 28 '17 07:12 windydang26

Hi try to change from source={{ html: newHTML, baseUrl: 'web/' }} to source={{ html: newHTML, baseUrl: 'http://localhost' }}.

It will work, or else try to remove baseUrl from the source attribute.

cstpraveen avatar Apr 10 '18 09:04 cstpraveen