public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 2/5] ui: multi pci selector: reset the selection properly on nodename change
Date: Mon, 19 Jun 2023 11:13:31 +0200	[thread overview]
Message-ID: <20230619091334.1715659-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20230619091334.1715659-1-d.csapak@proxmox.com>

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@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





  reply	other threads:[~2023-06-19  9:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-19  9:13 [pve-devel] [PATCH manager 1/5] ui: fix pci map selector status column Dominik Csapak
2023-06-19  9:13 ` Dominik Csapak [this message]
2023-06-19  9:13 ` [pve-devel] [PATCH manager 3/5] ui: multi pci selector: indent functions multifunction devices Dominik Csapak
2023-06-19  9:13 ` [pve-devel] [PATCH manager 4/5] ui: pci map edit: make top fields more clear Dominik Csapak
2023-06-19  9:13 ` [pve-devel] [PATCH manager 5/5] ui: resource mappings: remove border and add resize handle Dominik Csapak
2023-06-19 11:27 ` [pve-devel] applied-series: [PATCH manager 1/5] ui: fix pci map selector status column Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230619091334.1715659-2-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal