]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
form: combo grid: use correct method to initialize the picker
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 31 Mar 2023 10:04:51 +0000 (12:04 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 12 Apr 2023 11:30:41 +0000 (13:30 +0200)
'createPicker' does create the picker, but saves no reference to it
in the owning field, Instead, 'getPicker' should be used for that,
since that does all the necessary initialization, and actually
assigns the created picker to the field's me.picker variable so that
the pickers lifetime can be successfully tracked and enforced.

Without this patch, we leak the picker being created every time a
combo grid is created.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/form/ComboGrid.js

index 29c3d26bb7d9dbf73effdbc4a3a72e546319723e..55dee7ed2e3893e2f0cd6ea451638327858c8c43 100644 (file)
@@ -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() {