问题
I have container, which have box
,textfield
and button
. I am adding that container in one panel. When I am clicking on button
I want to remove that container. Problem is, Container is removed but it not showing on UI.
My Code where I am removing container from panel.
var panel = Ext.getCmp("ABC");
var record = panel.items.items;
var recordlength = record.length;
for (var j = 0; j < recordlength - 1; j++) {
if (record[j].Label == me.Label) {
record.remove(me);
panel.remove();
}
}
回答1:
As you say you are able to remove container then try this to update your panel.
panel.update();
panel.doLayout();
It will update your panel after removing item from that.
回答2:
it works for me:
while (this.items.items[0]) {
this.remove(this.items.items[0]);
}
来源:https://stackoverflow.com/questions/38715954/how-to-remove-item-from-panel