Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2009
    Posts
    198
    Vote Rating
    2
    rspaeth is on a distinguished road

      0  

    Default [CLOSED]removeAll from a panel with a table layout

    [CLOSED]removeAll from a panel with a table layout


    if removeAll is called for a panel using a table layout, the items under the table data is removed, but the rows remain. Later, if new items are added to the panel new table rows are created as expected. FF handles the empty table rows fine, but IE shows a space at the top of the table for each row left.

    current outcome:
    unneeded table rows are left behind. as items are removed and added, the space at the top of the panel grows in IE.

    expected outcome:
    no remnants are left when remove all is called. removeAll should remove everything.

    steps to reproduce (using the example below):

    -place a break point at the remove all.
    -use firebugs inspect and try to get the panel.
    -dive in to the table element.
    -click next step in the debugger. notice all the items from the panel are removed, but in firebug, the table rows still exist.
    -walk through the add. notice new rows are added at the end

    Code:
     Ext.onReady(function() {
                var panel = new Ext.Panel({
                    id:'main-panel',
                    baseCls:'x-plain',
                    renderTo: Ext.getBody(),
                    layout:'table',
                    layoutConfig: {columns:1},
                    // applied to child components
                    defaults: {frame:true, width:200, height: 200},
                    items:[{
                        title:'Item 1'
                    },{
                        title:'Item 2'
                    },{
                        title:'Item 3'
                    },{
                        title:'Item 4',
                        width:410,
                        colspan:2
                    },{
                        title:'Item 5'
                    },{
                        title:'Item 6'
                    },{
                        title:'Item 7',
                        width:410,
                        colspan:2
                    },{
                        title:'Item 8'
                    }]
                });
                
                panel.removeAll(true);
                
                panel.add({
                        title:'Item 9'
                    },{
                        title:'Item 10'
                    },{
                        title:'Item 11'
                    });
                
                panel.doLayout();
                
            });

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    83
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Correct, TableLayout doesn't update 'currentRow', 'currentCell' and 'cells' when components are removed.

    This is rather difficult to do, so I don't think this is going to be fixed anytime soon.

    ps. Inserting components in a TableLayout is also not supported (same reason).

  3. #3
    Sencha Premium Member teddyjas's Avatar
    Join Date
    Dec 2007
    Location
    Singapore
    Posts
    262
    Vote Rating
    0
    teddyjas is on a distinguished road

      0  

    Default


    +1 for this issue... still not solved until now...

  4. #4
    Ext User
    Join Date
    Jun 2010
    Posts
    1
    Vote Rating
    0
    ishgaall is on a distinguished road

      0  

    Default related TableLayout.onLayout

    related TableLayout.onLayout


    TableLayout.onLayout will only render its items on initial layout, and subsequent calls to doLayout will not render unrendered items. This can be worked around by moving the call to renderAll as in the following override:
    ...

    ..

    please look:
    http://www.sencha.com/forum/showthre...h-table-layout

Similar Threads

  1. Combo box in a Panel (layout of Panel is table)
    By sdo044 in forum Ext Designer: Help & Discussion
    Replies: 1
    Last Post: 8 May 2010, 8:19 PM
  2. Replies: 6
    Last Post: 3 Feb 2010, 1:36 AM
  3. [CLOSED][2.2] ComboBox destorys Table-Layout
    By Juel in forum Ext 2.x: Bugs
    Replies: 4
    Last Post: 14 Jan 2009, 4:29 AM
  4. Replies: 4
    Last Post: 8 Jun 2008, 10:45 PM
  5. [2.0??][CLOSED] table layout
    By sky in forum Ext 2.x: Bugs
    Replies: 2
    Last Post: 24 Dec 2007, 12:26 AM

Thread Participants: 3