I'm working on a table in my Angular 2 application. I'm using ag-grid. this is my gridOptions
this.gridOptions = <GridOptions>{
onGridReady: (() => {
this.gridOptions.api.sizeColumnsToFit();
this.gridOptions.onFilterModified = function () {
console.log("Value Changed")
}
})
}
This code works fine. If i change the value in the search field, i will get the text "Value Changed" in the console. I want to use a variable in the OnFilterModified function that is defined outside that function , but it doesn't work.
console.log(this.) after the dot i only get onGridReady function. That's it. How can i access other functions/variables in the OnFilterModified function?