-
24 Jun 2012 9:16 PM #1
Filter grid feature is broken for buffered grids
Filter grid feature is broken for buffered grids
Ext version tested:
- Ext 4.1.1 RC2
- If filtered result fetches the store cache completely - the store won't ever request new data, because it assumes all the data fetches the cache and no reason to perform further requests:
Steps to reproduce the problem:Code:prefetchPage: function(page, options) { var me = this, pageSize = me.pageSize || me.defaultPageSize, start = (page - 1) * me.pageSize, total = me.totalCount; // No more data to prefetch. // (comment from zerkms: this condition will always evaluate to true if result set is small) if (total !== undefined && me.getCount() === total) { <------ !!!! return; } // Copy options into a new object so as not to mutate passed in objects me.prefetch(Ext.applyIf({ page : page, start : start, limit : pageSize }, options)); },- Take http://dev.sencha.com/deploy/ext-4.1...ter-local.html
- Set up server-side part
- In the grid-filter-local.js change:
- var local = true; to var local = false;
- Append buffered: true attribute to the store object (right after `pageSize: 50`)
- Load the modified example
- Try to filter by company name
- The grid should be filtered
- The "Loading..." throbber will spin infinitely and the grid is locked
-
25 Jun 2012 2:25 AM #2
The latest code has
in the filter method, so this should be fixed.Code:if (me.remoteFilter) { // adding a filter will almost always change the total count delete me.totalCount;Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
25 Jun 2012 2:40 AM #3
When you say "latest" you mean svn?
-
25 Jun 2012 6:07 AM #4
Well, github, but yes, the latest code which is to be released soon.
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
25 Jun 2012 12:09 PM #5
Oh.... We have access to svn, but how can we access sencha's github? ;-)
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote