returns a helper-function that checks if the items pass the filtering rules
function | the function that checks the filter criteria |
$$("query").getState().$observe("value", v => {
// "data-widget" stores the data to filter
$$("data-widget").filter($$("query").getFilterFunction());
});
The getFilterFunction() method returns a helper-function that combines all the defined filtering rules.