-
7 Mar 2013 5:34 AM #1
[4.2.0 RC] Expanding a tree node causes multiple layouts
[4.2.0 RC] Expanding a tree node causes multiple layouts
REQUIRED INFORMATION
Ext version tested:- Ext 4.2.0 RC
- IE9
- Chrome
- <!DOCTYPE html>
- 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.
- Expand nodes
- A single layout
- Two or four layouts
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>
-
7 Mar 2013 3:06 PM #2Sencha - Community Support Team
- Join Date
- Nov 2007
- Location
- Helsingborg, Sweden
- Posts
- 2,460
- Vote Rating
- 56
We've seen this for a while too, hacking past it using this override:
Code:this.override({ expand : function () { Ext.suspendLayouts(); this.callParent(arguments); Ext.resumeLayouts(); } });
-
8 Mar 2013 9:20 AM #3
Thanks for the report! I have opened a bug in our bug tracker..... for the 4.2.1 release

Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-9038
in
4.2.0 Sprint 4 (GA).


Reply With Quote