icon
Avatar
syssi
Posts: 6
In ExtJS 5.0 a grid can easily extended by the gridfilters plugin:

iconCode:

plugins: [ 
    'gridfilters',
],

stateful: true,
stateId: 'stateful-filter-grid',

initComponent: function() {
   var me = this;

    Ext.applyIf(me, {
        columns: [
            {
                xtype: 'datecolumn',
                width: 130,
                dataIndex: 'dispatch',
                text: 'Dispatch date',
                filter: true,
            },



The plugin uses AFAIK the ordinary filter methods of an ext.data.Store. Is the bancha remote filtering implementation compatible?

Kind regards,

Syssi
2014-09-10 15:07
rolandschuetz
rolandschuetz
Moderator
Posts: 8
I haven't tried that yet, do you run into any issues?

Best regards,
Roland
2014-09-23 21:25
Avatar
syssi
Posts: 6
It just works basically. Unfortunately the filter operator (f.e. 'like') is not considered. Every filter must be a full match of a string ATM. The PaginatorComponent needs to be extended:
https://github.com/Bancha/Bancha/blob/master/Controller/Component/BanchaPaginatorComponent.php#L194-L203

The filter/scope-parameter for parent::paginate() must looks like something like (in case of operator=like):

iconphp:
 
'conditions' => array('Recipe.title LIKE' => '%value%')
 

Instead of
iconphp:
 
'conditions' => array('Recipe.title' => 'value')
 


Kind regards,

Sebastian
2014-09-24 07:05
icon Please login to reply or post!