I am using cell_renderer to define my cell, something like this:
var cell_renderer = function(params) {
var element = "";
var values = params.value;
angular.forEach(values, function(each_param){
element += '<a href="#/workunit/' + each_param.id + '" target="_blank">' + each_param.id +
'<span class="text-danger text-bold">'+
'<span class="" title="' + inactive_message +
'">' + inactive_flag + ' </span>' +
'<span class="" title="' + misconfigured_message +
'"> ' +misconfigured_flag + '</span>'+
'</span></a><br>';
})
return element;
};
My column definnition is this:
var testObject = {};
testObject.headerName = "my header";
testObject.field = each_branch;
testObject.width = 200;
testObject.cellClassRules = cell_class_rules;
testObject.cellRenderer = cell_renderer;
columnDefs.push(testObject);
Here testObject.field = each_branch , is a json object.
Hence the inbuild search functionality not working in ag-grid. Can anyone please help me here.
The solution is to provide valueGetter
in filter params.
Say for example you have { name: 'Some Name', id: 1 }
. In that case you want to filter by the name. So:
{
filter: 'agTextColumnFilter',
filterParams: {
valueGetter: params => {
return params.data.name
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With