[4.2.0 RC] Expanding a tree node causes multiple layouts
REQUIRED INFORMATION
Ext version tested: Browser versions tested against: DOCTYPE tested against: Description: - Expanding a tree node causes multiple layouts. Expanding a node with children causes two layouts. Expanding a non-leaf node without children causes four layouts. It seems too many and possibly can cause performance issues.
Steps to reproduce the problem: The result that was expected: The result that occurs instead: Test Case:
Code:
<!DOCTYPE html>
<html>
<head>
<title>Expanding a node causes multiple layouts</title>
<link rel="stylesheet" href="../resources/css/ext-all.css" />
<script src="../ext-all-debug.js"></script>
<script>
Ext.onReady(function () {
var children = [];
for (var i = 0; i < 50; i++) {
children.push({
text: "SubNode" + i
});
}
var tree = Ext.create("Ext.tree.Panel", {
renderTo: Ext.getBody(),
height: 450,
width: 300,
root: {
text: "Root",
children: children
},
listeners: {
afterlayout: {
fn: function () {
console.log('layout');
}
}
}
});
});
</script>
</head>
<body>
</body>
</html>