[pve-devel] [PATCH manager 2/5] ui: multi pci selector: reset the selection properly on nodename change

Dominik Csapak d.csapak at proxmox.com
Mon Jun 19 11:13:31 CEST 2023


and mdev change.

giving an empty array did not have the desired effect of resetting the
selection, but giving no parameter at all does.

this now also clears the selection when the mdev filter/config changed
(was just forgotten)

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/form/MultiPCISelector.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/www/manager6/form/MultiPCISelector.js b/www/manager6/form/MultiPCISelector.js
index 99f9d50b..97241bb0 100644
--- a/www/manager6/form/MultiPCISelector.js
+++ b/www/manager6/form/MultiPCISelector.js
@@ -77,7 +77,7 @@ Ext.define('PVE.form.MultiPCISelector', {
 	}
 
 	me.suspendEvent('change');
-	me.setSelection([]);
+	me.setSelection();
 	me.setSelection(recs);
 	me.resumeEvent('change');
     },
@@ -96,7 +96,7 @@ Ext.define('PVE.form.MultiPCISelector', {
 	    url: '/api2/json/nodes/' + me.nodename + '/hardware/pci?pci-class-blacklist=',
 	});
 
-	me.setSelection([]);
+	me.setSelection();
 
 	me.getStore().load({
 	    callback: (recs, op, success) => me.addSlotRecords(recs, op, success),
@@ -115,6 +115,7 @@ Ext.define('PVE.form.MultiPCISelector', {
 	} else {
 	    me.getStore().removeFilter('mdev-filter');
 	}
+	me.setSelection();
     },
 
     // adds the virtual 'slot' records (e.g. '0000:01:00') to the store
-- 
2.30.2






More information about the pve-devel mailing list