Issue: unable to filter data by itself written filter handlers.
Current implementation:
/**
* A complex filter expression. For more information, refer to the [`filterBy`]({% slug api_kendo-data-query_filterby %}) method.
*/
export interface CompositeFilterDescriptor {
/**
* The logical operation to use when the `filter.filters` option is set.
*
* The supported values are:
* * `"and"`
* * `"or"`
*/
logic: 'or' | 'and';
/**
* The nested filter expressions—either [`FilterDescriptor`]({% slug api_kendo-data-query_filterdescriptor %}), or [`CompositeFilterDescriptor`]({% slug api_kendo-data-query_compositefilterdescriptor %}). Supports the same options as `filter`. You can nest filters indefinitely.
*/
filters: Array<FilterDescriptor | CompositeFilterDescriptor>;
}
Where filter descriptor has next available fields:
export interface FilterDescriptor {
/**
* The data item field to which the filter operator is applied.
*/
field?: string | Function;
/**
* The filter operator (comparison).
*
* The supported operators are:
* * `"eq"` (equal to)
* * `"neq"` (not equal to)
* * `"isnull"` (is equal to null)
* * `"isnotnull"` (is not equal to null)
* * `"lt"` (less than)
* * `"lte"` (less than or equal to)
* * `"gt"` (greater than)
* * `"gte"` (greater than or equal to)
*
* The following operators are supported for string fields only:
* * `"startswith"`
* * `"endswith"`
* * `"contains"`
* * `"doesnotcontain"`
* * `"isempty"`
* * `"isnotempty"`
*/
operator: string | Function;
/**
* The value to which the field is compared. Has to be of the same type as the field.
*/
value?: any;
/**
* Determines if the string comparison is case-insensitive.
*/
ignoreCase?: boolean;
}
export interface FilterDescriptor {
/**
* The data item field to which the filter operator is applied.
*/
field?: string | Function;
/**
* The filter operator (comparison).
*
* The supported operators are:
* * `"eq"` (equal to)
* * `"neq"` (not equal to)
* * `"isnull"` (is equal to null)
* * `"isnotnull"` (is not equal to null)
* * `"lt"` (less than)
* * `"lte"` (less than or equal to)
* * `"gt"` (greater than)
* * `"gte"` (greater than or equal to)
*
* The following operators are supported for string fields only:
* * `"startswith"`
* * `"endswith"`
* * `"contains"`
* * `"doesnotcontain"`
* * `"isempty"`
* * `"isnotempty"`
*/
operator: string | Function;
/**
* The value to which the field is compared. Has to be of the same type as the field.
*/
value?: any;
/**
* Determines if the string comparison is case-insensitive.
*/
ignoreCase?: boolean;
/** --------------- ADDITIONAL DATA --------------- */
/**
* Manages filtering operations with data for single row
*/
handler?: (dataItem: T) : Observable<boolean> | boolean;
/**
* Filter name to display on grid
*/
name?: Observable<string> | string;
}