-
5 Apr 2012 5:23 AM #1
BUG - [Ext 4.1 RC2] Ext.ux.grid.FiltersFeature removes dynamically added filters
BUG - [Ext 4.1 RC2] Ext.ux.grid.FiltersFeature removes dynamically added filters
REQUIRED INFORMATION
Ext version tested:- Ext 4.1 RC2
- IE8
- FF11 (firebug 1.9.1 installed)
- if filters was added dynamically before the menu was shown, Ext.ux.grid.FiltersFeature createFilters() method will remove all and will try to re-create filters from the config
- create FiltersFeature with empty filters
- add filters dynamically with addFilter() method
- open headers menu, it will be without filters
- headers menu should contain Filters section
- headers menu doesn't contain Filters section
HELPFUL INFORMATIONCode:this.filters = Ext.create('Ext.ux.grid.FiltersFeature', { updateBuffer : 500, filters : [] }); this.filters.addFilter({ type : 'string', dataIndex : 'id' });
Debugging already done:- Ext.ux.grid.FiltersFeature createFilters() method removes all existing filters and tries to re-create filters from config or grid columns
- not provided
- only default ext-all.css
- Win7
-
5 Apr 2012 11:25 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
Thanks for the report.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
3 May 2012 1:49 AM #3
Ext 4.1
Ext 4.1
At the release notes to Ext 4.1 this one is marked as fixed, but unfortunately the fix causes new bug.
Steps to reproduce:- Create a grid.
- Reconfigure grid with new columns: reconfigure( [Ext.data.Store store], [Object[] columns] )
- try to use addFilter.
- filters menu will not be created.
line 257 and 591 - it uses grid.columns, but columns can be a config objectCode:FiltersFeature.createFilters: function() { 257: Ext.Array.each(grid.columns, function (column) { FiltersFeature.addFilter : function (config) { 591:columns = me.getGridPanel().columns,
During Grid initialization the columns are overrided with new value:
but not after reconfigure method, so createFilters will skip new columnsCode:me.columns = me.headerCt.items.items;
-
28 Sep 2012 4:30 AM #4
This may be a solution?
This may be a solution?
I was able to work around this by modifying the FilterFeature-plugin (4.1) on line 312.
I changed
intoCode:if (!menuItem || menuItem.isDestroyed) {
and the item is now shown properly every time, even after rebuilding/reconfiguring the grid.Code:if (!menuItem || menuItem.isDestroyed || menu.getComponent('filters') === undefined) {
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-5847
in
4.1.


Reply With Quote