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'

  • 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'

  • dateFrom var
    • Set range of date from ex: filters.dateFrom = 'moment().format("YYYY-MM-DD")'

  • dateTo var
    • Set range of date to ex: filters.dateFrom = 'moment().format("YYYY-MM-DD")'

  • 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'])