-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
How to call Parent Scope function inside OnRefresh callback #880
Comments
That's because your onRefresh function isn't bound to |
I tried like this ‘onRefresh: this.refreshData(data);’ it never triggers that function. How we can do this ? Any suggestion ? Thanks |
You'll need to create your callback function with a name, then bind it to the |
Basically you'll have to do |
Thank you so much. It's working. |
I'm working on pivot table in Angular 5. I have a class named PivotTableComponent, I've defined pivotUI in one of the method in that class.
Couldn't call class function inside onRefresh callback function
`export class PivotTableComponent {
private rowArray = [];
private exclusionKPI = [];
createQuery(dimentions, kpi) {
}
loadData() {
$('#pivotTable').pivotUI(data,
{
rows: this.rowArray,
cols: ["KPI"], vals: ["Value"],
renderers: renderers,
aggregatorName: "Sum",
rendererName: "Table",
hiddenFromDragDrop: ["Value"],
exclusions: {
"KPI": this.exclusionKPI
},
onRefresh: function (data) {
this.rowArray = data.rows;
this.exclusionKPI = data.exclusions.KPI;
this.createQuery(data.rows, data.inclusions.KPI) // here, it throws error createQuery is not a function
}
});
}
}`
The text was updated successfully, but these errors were encountered: