Hi,
We’re using Cumulocity 1018.0.457 with Angular 14.
We have a grid with columns containing the following data:
- Start time – formatted date
- End time – formatted date
- State – enum type
- Duration – formatted number
Currently, we’ve added the filterable: true
parameter to each column, which enables the default “Filter text” option. However, this default is not well-suited to the types of data we’re displaying.
In the tutorial for the 1018 version of Cumulocity, I found a device grid using custom validators for filters (based on Formly documentation).
In the code, I only see the line:
const columns = this.deviceGridService.getDefaultColumns();
—but I couldn’t find the implementation of getDefaultColumns()
.
Are there any available examples of how to implement custom filters?
The filtering behavior I want to implement:
- For dates: a date range selector including date, hour, and minute pickers
- For duration: a comparator selector (
>
,>=
,=
,<
,<=
) with a value input supporting durations formatted as days, hours, minutes, and seconds - For enum types: a multi-select dropdown with checkboxes for predefined enum values
Any help or pointers would be much appreciated. Thanks in advance!