External Filter
warning
This feature is officially not supported for server-side row model in Official Ag-Grid documentation
External Filter Configuration
You must configure the QueryBuilder with two key parameters: isExternalFilterPresent and doesExternalFilterPass
QueryBuilder.builder(Trade.class, entityManager)
.colDefs(/* ... */)
.isExternalFilterPresent(true)
.doesExternalFilterPass((cb, root, filterValue) -> {
// logic to convert filterValue to Predicate
if (Boolean.TRUE.equals(filterValue)) {
return cb.greaterThan(root.get("currentValue"), 1000);
}
// won't apply
return null;
})
.build();
In your frontend, you need to add the value to payload like this
fetch('/api/rows', {
method: 'POST',
body: JSON.stringify({
...params.request,
externalFilter: myExternalFilterState // Your custom filter value
}),
...
})
External Filer Example
Loading grid...