I am creating a handful of custom filters for a server driven datagrid we are building. Up until now we've only used the default string filter which submits the expected format:
{ property: string; value: string; }
The screenshot below shows the console output for this as reference.
However when I replace the standard filter with a custom filter and I submit a simple string value through the ClrDatagridFilterInterface
Observable next method, the datagrid state gives me the full custom component (see screenshot below).
I recreated this here: https://stackblitz.com/edit/angular-mr1yhy
Is this the expected behaviour of a custom filter? and if so is there a way to bypass this and just return the property/value
combination?
PS. I know said interface allows both types (as shown below), I'd just like the first one and I can't seem to find the solution.
export interface ClrDatagridStateInterface<T = any> {
page?: {
from?: number;
to?: number;
size?: number;
};
sort?: {
by: string | ClrDatagridComparatorInterface<T>;
reverse: boolean;
};
filters?: ({
property: string;
value: string;
} | ClrDatagridFilterInterface<T>)[];
}