Hi,
I'm trying to collapse the north panel at afterrender under some conditions, but when these conditions are met and the panel is collapsed (programmatically), it's just not expendable anymore.
Here is a simple test case:
Code:
<html>
<head>
<title>Test case</title>
<link rel="stylesheet" type="text/css" href="resources/css/ext-all.css" />
<script type="text/javascript" src="ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function() {
this.collapsiblePanel = Ext.create('Ext.panel.Panel', {
header: false,
region: 'north',
html: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum',
collapsible: true,
split: true,
collapseMode: 'mini'
});
this.collapsiblePanel.on('afterrender', function(){
this.collapsiblePanel.collapse();
}, this);
Ext.create('Ext.Viewport', {
renderTo: Ext.getBody(),
layout: 'fit',
items: [{
xtype: 'panel',
layout: 'border',
items: [{
title: 'Center panel',
region: 'center',
html: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum'
}, this.collapsiblePanel]
}]
});
});
</script>
</head>
<body>
</body>
</html>
My app code is of course much more complicated, but I'd like to say it worked in 4.0.7 and I'm having troubles upgrading to 4.1. Please tell me what I'm doing wrong.