setFilter
Updated pdexter 2022-10-22
Sets the ElasticSearch query filter on an instance of ft-grid, ft-related-document, and other field types.
(client-side function)
Syntax
ft3.setFilter( field-name , new-filter )
Part | Description |
---|---|
field-name | the name of the field whose filter is to set |
new-filter | a string or JSON object containing a new elasticsearch query |
Applies to
The setFilter function applies to:
- ft-grid, or similar custom grid components
- ft-related-document
- ft-address-map
Example
var oldFilter = ft3.getFilter('gridWidgets');
var newFilter = {'query':{'bool':{'filter':[{'match':{'color':'turquoise'}}]}}};
ft3.setFilter('gridWidgets', newFilter);