-
25 Oct 2012 1:59 AM #1
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,
-
25 Oct 2012 5:01 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 436
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
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
25 Oct 2012 5:04 AM #3
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.
-
25 Oct 2012 5:10 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 436
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.


Reply With Quote