]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
combobox grid: avoid needing two clicks after re-selecting an item
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 27 Jan 2023 10:14:35 +0000 (11:14 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 31 Jan 2023 09:34:47 +0000 (10:34 +0100)
'picker.hide()' hides the picker, but does not do everything to
properly keep track of the picker state in the combobox class.

This lead to a bug when we reselected an entry, we had to click the
picker again twice to open it again.

Use the 'collapse' method of the combobox instead, which does the
necessary book-keeping.

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

index ba3ce409f7f9bedfb9c5ba978fff56479f8a4b08..29c3d26bb7d9dbf73effdbc4a3a72e546319723e 100644 (file)
@@ -290,7 +290,7 @@ Ext.define('Proxmox.form.ComboGrid', {
        if (!me.multiSelect) {
            picker.on('itemclick', function(sm, record) {
                if (picker.getSelection()[0] === record) {
-                   picker.hide();
+                   me.collapse();
                }
            });
        }