Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jun 2008
    Posts
    310
    Vote Rating
    17
    Qtx will become famous soon enough

      1  

    Default Search field and paging toolbar work wrong together in some cases

    Search field and paging toolbar work wrong together in some cases


    Sorry. It is for ExtJS 4.0.1 please move!!!

    Example. We are on the page 3 of the result set and we want to search something. The found results fit into one page. In that case the paging toolbar stays in the state

    Page 3 of 1

    and the grid is empty, although some results are there.

    To solve this problem, small corrections in the SearchField.js are necessary.

    Use

    store.loadPage(1);

    insted of

    store.load();

    If we are about to search, we do not need to keep the current page, the current page might be invalid at all for found results, an we can surely start the search reults with the first page.

    Code:
        onTrigger1Click : function(){
            var me = this,
                store = me.store,
                proxy = store.getProxy(),
                val;
                
            if (me.hasSearch) {
                me.setValue('');
                proxy.extraParams[me.paramName] = '';
                proxy.extraParams.start = 0;
                store.loadPage(1);
                me.hasSearch = false;
                this.updateElementSizes(false);
                me.triggerEl.item(0).setDisplayed('none');
                me.doComponentLayout();
            }
        }, // onTrigger1Click
    
        onTrigger2Click : function(){
            var me = this,
                store = me.store,
                proxy = store.getProxy(),
                value = me.getValue();
                
            if (value.length < 1) {
                me.onTrigger1Click();
                return;
            }
            proxy.extraParams[me.paramName] = value;
            proxy.extraParams.start = 0;
            store.loadPage(1);
            
            var hadSearch = me.hasSearch;
            me.hasSearch = true;
            me.triggerEl.item(0).setDisplayed('block');
            if(!hadSearch) this.updateElementSizes(true);
            me.doComponentLayout();
        }, // onTrigger2Click

  2. #2
    Sencha User
    Join Date
    Sep 2012
    Posts
    13
    Vote Rating
    0
    duleep is on a distinguished road

      0  

    Default


    i got the same issu

Thread Participants: 1