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 widget-toolkit] form: combo grid: use correct method to initialize the picker
Date: Fri, 31 Mar 2023 12:04:51 +0200	[thread overview]
Message-ID: <20230331100451.1936833-1-d.csapak@proxmox.com> (raw)

'createPicker' does create the picker, but not all necessary
initialization for the combobox (namely it does not set the owner field,
but that's only an implementation detail). Instead 'getPicker' should be
used for that, since that does all the necessary initialization and is
the same function used when trying to open it.

Without this patch, we leak the picker that was created with this
call every time a combogrid is created.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/form/ComboGrid.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/form/ComboGrid.js b/src/form/ComboGrid.js
index 29c3d26..55dee7e 100644
--- a/src/form/ComboGrid.js
+++ b/src/form/ComboGrid.js
@@ -408,7 +408,7 @@ Ext.define('Proxmox.form.ComboGrid', {
 
 	// Create the picker at an early stage, so it is available to store the previous selection
 	if (!me.picker) {
-	    me.createPicker();
+	    me.getPicker();
 	}
 
 	me.mon(me.store, 'beforeload', function() {
-- 
2.30.2





             reply	other threads:[~2023-03-31 10:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31 10:04 Dominik Csapak [this message]
2023-04-12 11:46 ` [pve-devel] applied: " 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=20230331100451.1936833-1-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