PDA

View Full Version : FiltersFeature Menu not showing in header menu using Ext 4.2.1



toman
7 Aug 2015, 3:15 AM
Hi,

I searched everywhere but can't seem to find an answer.

I can't seem to get the FiltersFeature working unsing 4.2.1.
The filter menu is somehow not appended to the header menu.

I do not see any errors in the debugger. The App loads just fine.

My code looks like below. just a snippet...

I do not have any problems with loading the required source files and ressources, all getting fetched from the server.

From the debugger I see until the FiltersFeature constructor is called. However none of the other events fire.
Analyzing the grid object does not reveal any grid.filters object inside it.

I do change the grid's store from the default to another one to show different content. This might be a problem I thought.

I seriously don't know what is causing the problem. I am guesseing the filter feature does not get loaded or initiated succesfully.

Can someone give me a hint how the grid features get initialized?



var yopp = Ext.create('Ext.data.Store', {
fields: ['text'],
proxy: {
type: 'ajax',
url: 'myData',
reader: 'array'
}
});

var filterCfg = {
ftype: 'filters',
encode: false,
local: true,
filters: [{
type: 'string',
dataIndex: 'text',
disabled: false
}]
};


Ext.define('WebView.view.FileGrid', {
extend: 'Ext.grid.Panel',
border: false,
multiSelect: true,
features: [filterCfg],
store: yopp,

columns: [
{
xtype: 'gridcolumn',
dataIndex: 'text',
text: 'Name',
sortable: true,
filterable: true,
filter: { type: 'string',disabled:false }
}
],

initComponent: function () {
var me = this;
Ext.applyIf(me, {

});
me.callParent(arguments);
}
});

bjdurham85
31 Aug 2015, 12:40 PM
Hopefully you've been able to get this working.

But if not, can you get me a fiddle (http://fiddle.sencha.com) setup and we'll get this sorted out?


Regards,
Bryan