Set the filter instructions for the specified owner custom element view model.
See https://www.npmjs.com/package/odata-query for supported filter types.
The custom element view model that the filters belong to.
If true, the list will not be refreshed after applying the filter.
The filter instructions to use. If multiple instructions are specified, the AND operation is used.
class CustomListFilter {
\@bindable public model: ListFilterModel;
private applyFilter() {
// Disable this filter:
this.model.setFilter(this);
// Apply a single filter:
this.model.setFilter(
this,
{ Domain: { eq: 'example.com' } }
);
// Apply multiple filters with "AND":
this.model.setFilter(
this,
{ Domain: { eq: 'example.com' } },
{ User: { eq: 'testify' } }
);
// Apply multiple filters with "OR":
this.model.setFilter(this, { or: [
{ Domain: { eq: 'example.com' } },
{ User: { eq: 'testify' } },
] });
}
}
A collection of odata filters.
Each set of filter instructions is associated with a custom element view model, so that each list filter only needs to manage it's own filters without affecting the others.