View Full Version : [NOREPRO] Container doesn't redraw after removeAll and add
zehavibarak
25 Oct 2012, 1:59 AM
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,
mitchellsimoens
25 Oct 2012, 5:01 AM
This test case works for me:
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'
});
}
}
]
}
]
});
zehavibarak
25 Oct 2012, 5:04 AM
If Container is not visible (such as, when not in the active tab) and then made visible - then the problem occurs.
mitchellsimoens
25 Oct 2012, 5:10 AM
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?
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.