A
A
Aleksandr2017-12-18 14:22:03
JavaScript
Aleksandr, 2017-12-18 14:22:03

Filtering on server by all fields in Ext js?

I still can't figure out filtering in Ext Js.
So far it has happened locally. How to rewrite to send requests to the server with filters?

onFilter: function(field, newValue, oldValue, options){
    var grid = Ext.getCmp('grid');
    grid.store.clearFilter();

    if (newValue) {
        var matcher = new RegExp(Ext.String.escapeRegex(newValue), "i");
        grid.store.filter({
            filterFn: function(record) {
                return matcher.test(record.get('id')) ||
                    matcher.test(record.get('names'));
            }
        });
    }
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question