1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    117
    Vote Rating
    0
    Tony Mariella is on a distinguished road

      0  

    Default ComboBox typeAhead

    ComboBox typeAhead


    I have a ComboBox working correctly using an XML Reader. But the type ahead does not seem to work correctly. Whatever I type in the text box, the first element that is returned is always selected. Any ideas ?

    Code:
    /*
     * Ext JS Library 2.1
     * Copyright(c) 2006-2008, Ext JS, LLC.
     * licensing@extjs.com
     * 
     * http://extjs.com/license
     */
    
    Ext.onReady(function(){
    
        var ds = new Ext.data.Store({
                url: 'getData.do',
            reader: new Ext.data.XmlReader({
                record: 'item'
            }, [
                {name: 'record', mapping: 'RECORD'}
            ])
        });
    
        // Custom rendering Template
        var resultTpl = new Ext.XTemplate(
            '<tpl for="."><div class="search-item">',
                '<h3>{record}</h3>',
            '</div></tpl>'
        );
        
        var search = new Ext.form.ComboBox({
            store: ds,
            displayField:'record',
            typeAhead: true,
            typeAheadDelay: 100,
            selectOnFocus: true,
            minChars: 2,
            loadingText: 'Searching...',
            width: 570,
            pageSize:10,
            hideTrigger:true,
            tpl: resultTpl,
            applyTo: 'search'
            }
        });
    });
    
    <result>
    	<item><RECORD>ABC-DEF</RECORD></item>
    	<item><RECORD>ABB-DEF</RECORD></item>
    	<item><RECORD>BBC-DEG</RECORD></item>
    	<item><RECORD>BBD-EFG</RECORD></item>
    </result>

  2. #2
    Ext User
    Join Date
    Jul 2007
    Posts
    117
    Vote Rating
    0
    Tony Mariella is on a distinguished road

      0  

    Default


    After looking extensively. I found the solution: set
    Code:
    mode:'local'
    and load the store.
    Code:
    ds.load();

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi