PDA

View Full Version : Bundled Ext.ux.form.SearchField bugs (Fixes included)



Felicitus
29 May 2011, 8:56 PM
Hi,

the sample UX Ext.ux.form.SearchField (http://dev.sencha.com/deploy/ext-4.0.1/examples/form/custom-form.html) contains a few bugs:

1) The triggers aren't layouted correctly if aligned right (the space for the second trigger is empty, instead of fixed with). Reproduce this with the SearchField aligned to right in a toolbar.

Fix: add to afterRender:


this.doComponentLayout();


2) The start isn't set correctly. Reproduce this with the sample, go to page 2, then search for something.

Fix: Remove both lines with



proxy.extraParams.start = 0;


then change store.load to include the start parameter:



store.load({ start: 0 });


3) Pagination is broken

If you applied both fixes, and jump to page 2, then search for something, the PagingToolbar doesn't notice that the page number has changed.

I'm not sure how to fix that, but it is only a visual thing.

terjeio
15 Oct 2011, 5:06 AM
Use


store.loadPage(1);

instead of


store.load({ start: 0 });

to reset paging toolbar

jeffcrilly
9 Feb 2012, 7:43 PM
Doing ..


store.loadPage(1);
... seems to clobber the other store URL parameters pretty heavily.

Current problem i have now is that the paging toolbar does not get updated with the "filtered" page count from the "search result set".

E.g. with no Search specified, I get (for example) 500 rows, (pagesize = 50) and paging toolbar will (correctly) display "10 pages total".

If I then do a search that limits the result to (for example) 100 rows, (pagesize = 50) the paging toolbar should update to "2 pages total"... however "10 pages total" is still shown (and the next/prev buttons still think there are 10 pages.)

Interestingly, the "display info" (n of m total pages" is correct... its just the prev/next buttons and labels that are wrong.

If anyone knows a fix, i'm all ears.

thx

-jeff