[PATCH pve-manager 04/11] ui: fabrics: split node selector creation and config

Stefan Hanreich
2026-02-19T14:56:42Z

This allows for overriding the configuration of the node selector,
before it is created. This avoids running into potential race
conditions when adding listeners on load events, which could complete
after the component has been created, but before a child component has
attached its listener.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
www/manager6/sdn/fabrics/NodeEdit.js | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/www/manager6/sdn/fabrics/NodeEdit.js b/www/manager6/sdn/fabrics/NodeEdit.js
index dd8ad0274..b3d9751aa 100644
--- a/www/manager6/sdn/fabrics/NodeEdit.js
+++ b/www/manager6/sdn/fabrics/NodeEdit.js
@@ -136,10 +136,10 @@ Ext.define('PVE.sdn.Fabric.Node.Edit', {
});
},

- getNodeSelector: function () {
+ getNodeSelectorConfig: function() {
let me = this;

- return Ext.create('PVE.form.NodeSelector', {
+ return {
xtype: 'pveNodeSelector',
reference: 'nodeselector',
fieldLabel: gettext('Node'),
@@ -193,7 +193,12 @@ Ext.define('PVE.sdn.Fabric.Node.Edit', {
},
},
},
- });
+ };
+ },
+
+ getNodeSelector: function () {
+ let me = this;
+ return Ext.create('PVE.form.NodeSelector', me.getNodeSelectorConfig());
},

getInterfacePanel: function (protocol) {
--
2.47.3