-
Notifications
You must be signed in to change notification settings - Fork 108
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
Enhancement: allow React context and default chart context property - e.g. from function arguments #38
Comments
You could access |
@KacperMadej How do I access react context within this events? For example to check if
|
Have you tried fat arrow function? But then |
I tried a lot of things, including arrow function, but with no success. This problem unfortunately applies to any function I would like to use within Highchart context. I think the right way to do it would be if Chart is just a parameter of the callback function, instead of providing it via this context.
|
That's gonna break backward compatibility ( Define: var propLoading = this.props.loading; Then use it: events: {
render: () {
if (propLoading) {
this.showLoading();
} else {
this.hideLoading();
}
},
}, Internal note: |
Please, it would make so much sense! |
Currently, the both contexts (React component and chart) in chart functions can be accessed by binding the right
Live demo: https://stackblitz.com/edit/react-e7gcju?file=index.js |
I want to trigger the loading animation, how do I trigger
showLoading()
?The text was updated successfully, but these errors were encountered: