While using custom filter options in a grid column I encountered the need to compare the cellValue
with some other value of the same row and can't seem to find how to do so, given that no reference to the row data is passed to the test
function.
columnDefs: [
{
field: "Column 1",
(...)
filterParams: {
filterOptions: [
'lessThan',
'greaterThan',
{
displayKey: 'lessThanColumn2',
displayName: 'Less Than column 2',
test: function(filterValue, cellValue) {
return cellValue < rowData.column2; // <------ how?
}
},
}
}
(...)
]
Using a valueGetter to include all needed data in the cell value and displaying only the relevant part using a Cell Renderer seems to be a workaround.
Is it possible to achieve this in any other way without a custom filter?