Custom filter type registration
Developers can register their own filter types, such as a 'tag' filter or a geo-radius filter. A registered type provides its own operators, UI component, predicate and serializer, and plugs into chips, presets and the query builder. The filtering system stays extensible without forking.
Planned. This page shows the specification from issue #187. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
A listings grid with a custom 'radius' filter on its Location column, made up of a number input for km and a city select.
Expected behavior
Adjusting the radius filters the listings. The chip shows the custom summary. The custom type appears in the query builder and round-trips through getFilterModel and setFilterModel.
Planned API surface
registerFilterType(name, definition)definition.operatorsdefinition.predicatedefinition.componentdefinition.serializedefinition.deserializedefinition.summarizeAcceptance criteria
- A registered type is usable via columnDefs[].filterType. (pending)
- summarize output is used by the floating filter and by the chips. (pending)
- serialize and deserialize round-trip losslessly through the filter model. (pending)
- Registering a type with a name that is already taken throws a clear error, unless an override flag is set. (pending)
- A missing optional component falls back to a read-only summary. (pending)