Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.
  1. #1
    Sencha Premium Member
    Join Date
    Aug 2011
    Posts
    38
    Vote Rating
    0
    zehavibarak is on a distinguished road

      0  

    Default Container doesn't redraw after removeAll and add

    Container doesn't redraw after removeAll and add


    Hi,
    Ver 2.0.3
    I have a Container in which I add components. After calling removeAll(true)
    and adding a component, it doesn't render again. This does work for the first time.
    Please advise,

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,121
    Vote Rating
    855
    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


    This test case works for me:

    Code:
    Ext.Viewport.add({
        xtype  : 'container',
        action : 'wrap',
        items  : [
            {
                html : 'One'
            },
            {
                html : 'Two'
            },
            {
                html : 'Three'
            },
            {
                xtype  : 'toolbar',
                docked : 'top',
                items  : [
                    {
                        text    : 'Remove All',
                        handler : function (btn) {
                            var cnt = btn.up('container[action=wrap]');
    
                            cnt.removeAll(true);
                        }
                    },
                    {
                        text    : 'Add Component',
                        handler : function (btn) {
                            var cnt = btn.up('container[action=wrap]');
    
                            cnt.add({
                                html : 'New Component'
                            });
                        }
                    },
                    {
                        text    : 'Do Both',
                        handler : function (btn) {
                            var cnt = btn.up('container[action=wrap]');
    
                            cnt.removeAll(true);
    
                            cnt.add({
                                html : 'New Component'
                            });
                        }
                    }
                ]
            }
        ]
    });
    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 Premium Member
    Join Date
    Aug 2011
    Posts
    38
    Vote Rating
    0
    zehavibarak is on a distinguished road

      0  

    Default Figured it

    Figured it


    If Container is not visible (such as, when not in the active tab) and then made visible - then the problem occurs.

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,121
    Vote Rating
    855
    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


    Quote Originally Posted by zehavibarak View Post
    If Container is not visible (such as, when not in the active tab) and then made visible - then the problem occurs.
    Maybe you could provide a test case?
    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.

Thread Participants: 1