I am making a table in angular2 using ag-grid.
i have several columns and it is possible to filter on each column. (I use custom filter) For further development of my application i need an id of the filter field.
My rows are like this:
createColumnDefs() {
this.columnDefs =[
{ headerName: "ID", field: "id", width:80, filterFramework:{
component: PartialMatchFilterComponent,
moduleImports: [FormsModule]
}},
{ headerName: "Extern id", field: "externalRefId", width:150, filterFramework:{
component: PartialMatchFilterComponent,
moduleImports: [FormsModule]
}},
{ headerName: "Name", field: "customerLastName", width:80,filterFramework:{
component: PartialMatchFilterComponent,
moduleImports: [FormsModule]
}}
]
}
For example the user select the Name field to filter. I want to know that the user selected Name field. How can i check which filter field the user has chosen (for example: show in the console.log() )