in ExtJS 4 i could create a filter to filter my grid. When is set local to false, i could filter my store.
var filtersCfg = {
ftype: 'filters',
autoReload: false, //don't reload automatically
local: false, //remote filter
// filters may be configured through the plugin,
// or in the column definition within the headers configuration
filters: [{
type: 'numeric',
dataIndex: 'id'
}, {
type: 'string',
dataIndex: 'name'
}, {
type: 'numeric',
dataIndex: 'price'
}, {
type: 'date',
dataIndex: 'dateAdded'
}, {
type: 'list',
dataIndex: 'size',
options: ['extra small', 'small', 'medium', 'large', 'extra large'],
phpMode: true
}, {
type: 'boolean',
dataIndex: 'visible'
}]
};
In EXTJS 7 i can only add a plugin:
plugins: {
gridfilters: true
},
How can i add a remote filter in EXTJS 7. Is this still possible? I can't find anything in the documentation.
Best regards
Edit:
I'm using a data.Store to get a json from my php/database. Sorting over the grid is not a problem. But how can i use a filter to send the parameters to my php?
var Store = new Ext.data.Store({
extend: 'Ext.data.Store',
autoLoad: true,
remoteSort: true,
fields: [
'columnA','columnB'
],
pageSize : 50,
proxy: {
type: 'ajax',
actionMethods: {
create : 'POST',
read : 'POST',
update : 'POST',
destroy: 'POST'
},
url: 'data/URL.php',
reader: {
rootProperty: 'columns',
totalProperty: 'totalCount'
},
simpleSortMode: true,
extraParams: {
task: 'doFiltering'
}
},
sorters: [{
property: 'columnA',
direction: 'DESC'
}]
});