[pve-devel] [PATCH widget-toolkit] form: combo grid: use correct method to initialize the picker

Dominik Csapak d.csapak at proxmox.com
Fri Mar 31 12:04:51 CEST 2023


'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 at 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






More information about the pve-devel mailing list