1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    224
    Vote Rating
    9
    dedoz will become famous soon enough

      0  

    Default [4.1 beta 1] and [4.1 beta 2] combox wont hide when click a item

    [4.1 beta 1] and [4.1 beta 2] combox wont hide when click a item


    combox wont hide after selecting a item (click) (works when clicking 3 or 2 times but i guess that not the behavior expected)

    4.1-pr1 : works
    4.1 beta 1 : doesnt work
    4.1 beta 2 : doesnt work

    Code:
    Ext.onReady(function() {
        Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);
    
        Ext.define('model.ACR', {
            extend: 'Ext.data.Model',
            fields: [
                {name:'acrId'    ,type:'int'},
                {name:'acrNom'    ,type:'string'},
                {name:'acrDesc'    ,type:'string'}
            ],
            idProperty: 'acrId',
            proxy: 
            {    type: 'direct',
                api:{read    : acrDefaultQuery.acrSelect}
            }
        });
        
        Ext.define('store.ACR', {
            extend: 'Ext.data.Store',
            model: 'model.ACR',
            autoLoad: false
        });
        
        var acrStore = Ext.create('store.ACR');
        acrStore.load();
        
        Ext.define('combo.ACR', {
            extend: 'Ext.form.ComboBox',
            store : acrStore,
            queryMode : 'local',
            fieldLabel: 'Roles de usuario',
            displayField: 'acrNom',
            valueField : 'acrId',
            width: 400
        });    
        
        var acrCombo = Ext.create('combo.ACR',{
            renderTo : Ext.getBody()
        });
    });
    Ext js its too buggi, every month they release some new version (like the road from 4.0 to 4.0.6) with 3453457345 bugs fixed.

    i cant use 4.0.7, it wont load on firefox with firebug open, theres some forum posts bout this. so i went 4.1-pr1.

    cant use 4.1-pr1 it has a bug on table layout, (table layout was fine in 4.0.7 --- 4.1-pre1 broken --- 4.1 - beta 1 works again, fun stuff)

    so i went 4.1-beta1, and now this combobox bug. and of course theres alot of bugs reported.

    so i went 4.1-beta2 and there record.save() (such a common line) its broken, i reported this and it was accepted as a bug (the combobox is not working also)

    at the moment its been a real bad experience, trying to use extjs to develop something. at least i didnt pay yet to use on commercial development ...

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    What browser are you using? I used this code on b1 and b2 using Chrome and Firefox and the list hide as expected:

    Code:
    var panel = new Ext.panel.Panel({
        renderTo : document.body,
        width    : 400,
        height   : 400,
        title    : 'Test',
        items    : [
            {
                xtype        : 'combobox',
                fieldLabel   : 'Test',
                queryMode    : 'local',
                displayField : 'name',
                valueField   : 'name',
                store        : new Ext.data.Store({
                    fields : ['name'],
                    data   : [
                        { name : 'One' },
                        { name : 'Two' },
                        { name : 'Three' },
                        { name : 'Four' },
                        { name : 'Five' }
                    ]
                })
            }
        ]
    });
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Also, you shouldn't use Ext.define within Ext.onReady
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #4
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    38
    Vote Rating
    0
    PHaroZ is on a distinguished road

      0  

  5. #5
    Sencha User
    Join Date
    Dec 2011
    Posts
    224
    Vote Rating
    9
    dedoz will become famous soon enough

      0  

    Default


    mitchell thats not the code i posted.
    combobox works well when you static local data. im example is diferent

  6. #6
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,008
    Vote Rating
    650
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    It shouldn't make any difference where the data comes from, once it's in the store the behaviour doesn't change.

    It would be useful if you could post your full data and also the browser you're using.

    Another thing to note is you're using a rather strange pattern for creating/extending. Probably doesn't make any difference in this case, but if you create multiple instances it means they will all share the same store instance.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  7. #7
    Sencha User
    Join Date
    Sep 2009
    Posts
    44
    Vote Rating
    0
    ironandsteel is on a distinguished road

      0  

    Default


    I am seeing that I need to double-click to close the combobox, at least in my case. My combo is in dockeditems, and its store is loaded remotely. What is far worse though is that I am not consistently getting the change event. Earlier this evening I was getting it only the first time. At the moment I'm not getting it at all...
    PHP Code:
    ,{
    xtype'combo'
    ,id'catComboID'
    ,hiddenName:"catCombo"
    ,storecatStore
    ,mode:'local'
    ,displayField:'display'
    ,cls"catComboStyle"
    ,listConfig: {
            
    width:'500',
        
    loadingText'Loading...',
        
    emptyText'No categories found.',
        
    // Custom rendering template for each item
        
    getInnerTpl: function() {
            return 
    '<div class="oneCatItem">{display}&nbsp({value})&nbsp<span class="catcount">{count}</span></div>';
        }
    }
    ,
    queryMode'local'
    ,typeAheadtrue
    ,forceSelection:true
    ,emptyText"ALL CATEGORIES"
    ,flex:1
    ,listeners:{"select":function(theCombotheRecords)   
    {
           var 
    catCode theRecords[0].data.value;
            var 
    selOnly Ext.getCmp('checkedOnly').getValue();            
            
    this.ownerCt.ownerCt.store.clearFilter(false);
            
    this.ownerCt.ownerCt.store.filter([
                {
    id"sel"property"sel"valueselOnly  },
                {
    id"catcode"property"catcode"valuecatCode}                                    
            ]); 
        }
    }


  8. #8
    Sencha User
    Join Date
    Aug 2010
    Posts
    2
    Vote Rating
    0
    cold123 is on a distinguished road

      0  

    Default Hi, i have same problem but i have solution :)

    Hi, i have same problem but i have solution :)


    don't do "arcStore.load();" and you will be fine

  9. #9
    Sencha User
    Join Date
    Sep 2009
    Posts
    44
    Vote Rating
    0
    ironandsteel is on a distinguished road

      0  

    Default


    Quote Originally Posted by cold123 View Post
    don't do "arcStore.load();" and you will be fine
    I don't follow- i assume you are referring to my catStore, right. At the moment, I am prefetching it, and I have it set to autoload. How should I load it?
    PHP Code:
            catStore.prefetch(
            {
                
    start0
                
    ,limit5000        
            
    }); 

  10. #10
    Sencha User
    Join Date
    Aug 2010
    Posts
    2
    Vote Rating
    0
    cold123 is on a distinguished road

      0  

    Default


    Quote Originally Posted by ironandsteel View Post
    I don't follow- i assume you are referring to my catStore, right. At the moment, I am prefetching it, and I have it set to autoload. How should I load it?
    PHP Code:
            catStore.prefetch(
            {
                
    start0
                
    ,limit5000        
            
    }); 
    remove
    catStore.prefetch();

    in combo definition remove
    mode:'local'
    queryMode: 'local'

    add
    queryMode: 'remote'



    or if you need to keep local mode use
    queryMode: 'local'

    but prefetch or load store after combo is created