Filters
Filters library is used to manipulate filters in model list for component.
Example in editor:
filters.filter = 'Hello world';
filters.dateFrom = '2023-12-06'
filter
var
- Keyword for search ex:
filters.filter = 'Hello world'
- Keyword for search ex:
dateField
var
- Available date fields from date field dropdown, default fields are Created At and Updated At, other custom fields are presented that are created by user ex:
filters.dateField = 'created_at'
- Available date fields from date field dropdown, default fields are Created At and Updated At, other custom fields are presented that are created by user ex:
dateFrom
var
- Set range of date from ex:
filters.dateFrom = 'moment().format("YYYY-MM-DD")'
- Set range of date from ex:
dateTo
var
- Set range of date to ex:
filters.dateFrom = 'moment().format("YYYY-MM-DD")'
- Set range of date to ex:
setAdvFilters(filters = {})
method
- Set advanced filters for list. Object passed as argument is same syntax used for MongoDB query operators. Every time list is loaded advanced filters expression is re-evaluated and new values are potentialy set.
setFilterOn(fields = [''])
method
- Set on which fields filter variable will be applied. ex:
filters.setFilterOn(['first_name', 'email'])
- Set on which fields filter variable will be applied. ex: