form: combo grid: use correct method to initialize the picker

'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>
This commit is contained in:
Dominik Csapak 2023-03-31 12:04:51 +02:00 committed by Thomas Lamprecht
parent c1a3b7f725
commit 736c3457a2

View 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 // Create the picker at an early stage, so it is available to store the previous selection
if (!me.picker) { if (!me.picker) {
me.createPicker(); me.getPicker();
} }
me.mon(me.store, 'beforeload', function() { me.mon(me.store, 'beforeload', function() {