1. #1
    Sencha User
    Join Date
    Jun 2013
    Posts
    1
    Vote Rating
    0
    betoranaldi is on a distinguished road

      0  

    Default Unanswered: ComboBox and partial string match.

    Unanswered: ComboBox and partial string match.


    Please forgive me as I am new here and having trouble wrapping my head around all of this. I know this topic has been posted before but it appears to only apply to older version as when I try to implement the suggestions I get undefined errors.

    I am looking to create a simple ComboBox that allows me to list/search products. Using the transform feature of an existing dropdown, I have the following code:

    Code:
     Ext.onReady(function() {
     var transformed = Ext.create('Ext.form.field.ComboBox', {
                        typeAhead: true,
                        transform: 'productSelector',
                        autoSelect: false,
                        width: 764,
                        listWidth: 714,
                        minChars: '3',
                        forceSelection: true,
                        anyMatch: true,
                        emptyText: 'Select A Product',
                        triggerAction: 'all',
                        editable: true,
                        autoSelect: false,
                        listEmptyText: 'No products found',
                        allowBlank: true,
                        listeners: {
                            'blur': function () {
                                if (this.store.getCount() == 0 || (!this.isExpanded())) {
                                    if (this.getValue() == '' || this.findMatch('text', this.getRawValue()) == false) {
                                        this.setValue('');
                                        this.blur();
                                    }
                                }
                            },
                            'expand': function(self) { self.clearValue(); },
                            scope:this
                        }
                    });
                });
    This seems to work fairly well I just can't figure out how to get partial string search working.

    This seems like the most common solution I have found but I just can't get it to work. Perhaps this is becuase I am using the transform method.

    Code:
    doQuery : function(q, forceAll){        q = Ext.isEmpty(q) ? '' : q;
            var qe = {
                query: q,
                forceAll: forceAll,
                combo: this,
                cancel:false
            };
            if(this.fireEvent('beforequery', qe)===false || qe.cancel){
                return false;
            }
            q = qe.query;
            forceAll = qe.forceAll;
            if(forceAll === true || (q.length >= this.minChars)){
                if(this.lastQuery !== q){
                    this.lastQuery = q;
                    if(this.mode == 'local'){
                        this.selectedIndex = -1;
                        if(forceAll){
                            this.store.clearFilter();
                        }else{
                            this.store.filter(this.displayField, q);
                        }
                        this.onLoad();
                    }else{
                        this.store.baseParams[this.queryParam] = q;
                        this.store.load({
                            params: this.getParams(q)
                        });
                        this.expand();
                    }
                }else{
                    this.selectedIndex = -1;
                    this.onLoad();
                }
            }
        },
    Any suggestions or pointers would greatly be appreciated.

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,913
    Answers
    371
    Vote Rating
    179
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    Can you post an example of the HTML you're using for the transform?
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

    C
    heck out all of the 2013 SenchaCon presentations here:
    http://www.sencha.com/blog/senchacon...now-available/

Thread Participants: 1

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