[pve-devel] [PATCH manager] ui: resource tree: correctly reinsert item when name changes
Dominik Csapak
d.csapak at proxmox.com
Thu Mar 16 10:03:31 CET 2023
if the user has the tree sorted by name, we have to move the items
on a name change, otherwise they'll stay on the old position
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/tree/ResourceTree.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/www/manager6/tree/ResourceTree.js b/www/manager6/tree/ResourceTree.js
index 7d7900b59..54c6403d8 100644
--- a/www/manager6/tree/ResourceTree.js
+++ b/www/manager6/tree/ResourceTree.js
@@ -278,7 +278,8 @@ Ext.define('PVE.tree.ResourceTree', {
let groups = me.viewFilter.groups || [];
// explicitly check for node/template, as those are not always grouping attributes
- let moveCheckAttrs = groups.concat(['node', 'template']);
+ // also check for name for when the tree is sorted by name
+ let moveCheckAttrs = groups.concat(['node', 'template', 'name']);
let filterfn = me.viewFilter.filterfn;
let reselect = false; // for disappeared nodes
--
2.30.2
More information about the pve-devel
mailing list