Tested again on chromium 64.0.3282.119 (debian stretch)
and saw the same problem again:

if you have selected any item below node level (e.g. a vm)
the last element of that group is shown at the root of the tree
like this https://imgur.com/Eeklyle

also it can happen that you have multiple items selected

so we should only add this when we are actually updating to 6.2
(and have the correct versioned dependencies)

On 02/15/2018 10:50 AM, Thomas Lamprecht wrote:
Remove the expand/collapse hack needed for an earlier ExtJS version.

Further do not collapse the rootnode before restoring the state, it
may not be collapsible at this time, as it may be still seen as leaf
node, and thus throws exceptions with ExtJS 6.2.0

Signed-off-by: Thomas Lamprecht <t.lampre...@proxmox.com>
---

Tested as bit around on FF/Chromium/Edge did not see a problem with
either ExtJS 6.0.1 or 6.2.0. But, Dominik saw some problems with a
similar approach in Chromium with the older ExtJS 6.0.2, so maybe
still needs a bit testing there to ensure this version is OK.


  www/manager6/tree/ResourceTree.js | 3 ---
  1 file changed, 3 deletions(-)

diff --git a/www/manager6/tree/ResourceTree.js 
b/www/manager6/tree/ResourceTree.js
index 78d4cbb0..aa74b077 100644
--- a/www/manager6/tree/ResourceTree.js
+++ b/www/manager6/tree/ResourceTree.js
@@ -186,8 +186,6 @@ Ext.define('PVE.tree.ResourceTree', {
                groupinfo.leaf = false;
                groupinfo.groupbyid = v;
                group = me.addChildSorted(node, groupinfo);
-               // fixme: remove when EXTJS has fixed those bugs?!
-               group.expand(); group.collapse();
            }
            if (info.type === groupby) {
                return group;
@@ -363,7 +361,6 @@ Ext.define('PVE.tree.ResourceTree', {
// on first tree load set the selection from the stateful provider
            if (!pdata.updateCount) {
-               rootnode.collapse();
                rootnode.expand();
                me.applyState(sp.get(stateid));
            }



_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to