score:3
Accepted answer
you could define the click handler function somewhere outside the config variable, and it should have access to everything outside the scope of the event.
myrerenderfunction(e) { /* do something */ } // define function here...
var config = {
...
events: {
click: myrerenderfunction // ...and it's accessible since they're defined in the same scope
}
};
or you could just put the rerendering itself outside the click handler.
myrerenderfunction(e) { /* do something */ } // this is now a closure...
var config = {
...
events: {
click: function(e) {
/* do something with the event */
myrerenderfunction(e); // ...which means you can access it from inside the click handler function
}
}
};
or you could just store the current this
as a closure.
var whateverscopethisis = this;
var config = {
...
events: {
click: function(e) {
/* do something with the event */
whateverscopethisis.dosomething(e);
}
}
};
you've got plenty of options, something along those lines should work.
score:0
try to use
events: {
click: function (event) {
window.reactnativewebview.postmessage(event)
}
}
Source: stackoverflow.com
Related Query
- Access props and state of current component in React JS within an event handler
- How to access React hook state in Highcharts event listener
- HighCharts: Mouse click event is handled by both Series handler and Point handler
- How can I pass values from Highcharts event callbacks (click, mouseOver, mouseOut) back to React component member function?
- How to get access to the chart from HighchartsReact component to ResponsiveGridLayout component when I'm using functional react component
- Old state is being shown despite updating in React Highcharts click event
- Old highchart data in react component when going back and forward
- Access State variable in highcharts event load function
- ReactErrorUtils.invokeGuardedCallback in React fires event repeatedly in IE browser
- highcharts how to catch and insert logic in click reset zoom button event
- React plot options onclick event
- Highcharts - Global configuration with common code and unique data & Headings
- Explanation of why I need to wrap a highcharts jquery event in an angular $timeout to access properties
- Highcharts: set 'select' state on a point and maintain it after mouseover?
- Resize High Charts based on grid layout width and height using react
- HighCharts : Highlight entire series when hover and restore state when out
- How to draw a bubble map with longitude and latitude using Highcharts in react
- Add Local HTML and JS file using React Native Webview
- How to access outer scope variables within a click function in HighCharts
- Highcharts : How do I keep the marker formatting and make the click event fire with a 5K+ point scatter plot?
- Click event and two way data binding in HighCharts using AngularJS
- Preventing event from executing consecutive times React
- React highchart: Shared tooltip in same and different chart
- Highcharts - export current state of a chart
- Calling function in component class from Highcharts component in React
- Highcharts event handler after finishing redraw
- How to use Highcharts in typescript and react
- Append a jQuery variable to a click event handler function
- Split last 2 weeks of data into current and previous week
- How do I attach a click event handler to the whole HighCharts Gauge control?
More Query from same tag
- Removing event Listeners in react using highcharts
- Ajax JSON response into HighCharts
- angular2-highcharts: update rendered chart data
- ASP.Net Chart controls Vs Highcharts
- Jquery, Highcharts enable html exportChart
- HighCharts Line xas datetime
- Highcharts : Disable top spacing from column graph
- get access to chart-object in highchart
- How to set default zoom to 6 months using highcharts-react?
- highchart x axis not showing correct date labels
- Labels on bar chart missing
- Highcharts: yAxis showing exponential values
- Highcharts: How to make line touch left + right sides
- Force Highcharts to use standalone framework instead of jquery?
- Commas in tooltip of Highchart
- Off-Screen Toggle Show Not Showing
- Set Specific Range on X-Axis in HighCharts
- JSON Data for Highcharts in Symfony2 with ObHighchartsBundle
- Responsive highchart gauge
- Highcharts - Add bar graph to a pie chart
- Remove fixed height for full screen highcharts
- Highcharts use dateTime for chart generation
- set width of column in percentage in highcharts
- properly render an array of numeric values, not an array with strings
- How to spread Y Axis values in "area" chart using HighCharts
- How to show overlapping in various columns of highcharts column range graph
- Can you create a phase change line in highcharts
- Unable to view highcharts in my yii2 project
- Synchronized HighChart: Uncaught TypeError: $(...).appendTo(...).highcharts is not a function
- HighCharts - How to combine JS and SQL for two charts?