-
30 Oct 2009 10:47 AM #1
[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 Nov 2009 4:34 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
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).
-
23 Jun 2010 7:30 PM #3
+1 for this issue... still not solved until now...
-
28 Jun 2010 1:07 AM #4
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
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
Combo box in a Panel (layout of Panel is table)
By sdo044 in forum Ext Designer: Help & DiscussionReplies: 1Last Post: 8 May 2010, 8:19 PM -
[CLOSED][3.x] Bug in panel's removeAll(), add() and/or destroy()?
By realjax in forum Ext 3.x: BugsReplies: 6Last Post: 3 Feb 2010, 1:36 AM -
[CLOSED][2.2] ComboBox destorys Table-Layout
By Juel in forum Ext 2.x: BugsReplies: 4Last Post: 14 Jan 2009, 4:29 AM -
[2.??][CLOSED] doLayout broken for panels with 'table' layout
By nagarkar in forum Ext 2.x: BugsReplies: 4Last Post: 8 Jun 2008, 10:45 PM -
[2.0??][CLOSED] table layout
By sky in forum Ext 2.x: BugsReplies: 2Last Post: 24 Dec 2007, 12:26 AM


Reply With Quote

