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 1/1] ComboGrid: avoid needing two clicks after reselecting an item
Date: Fri, 27 Jan 2023 11:14:35 +0100	[thread overview]
Message-ID: <20230127101436.2200018-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20230127101436.2200018-1-d.csapak@proxmox.com>

'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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/form/ComboGrid.js b/src/form/ComboGrid.js
index ba3ce40..29c3d26 100644
--- a/src/form/ComboGrid.js
+++ b/src/form/ComboGrid.js
@@ -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();
 		}
 	    });
 	}
-- 
2.30.2





  reply	other threads:[~2023-01-27 10:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 10:14 [pve-devel] [PATCH widget-toolkit/manager] fix focus/tbar selection issues in ComboGrid Dominik Csapak
2023-01-27 10:14 ` Dominik Csapak [this message]
2023-01-31  9:35   ` [pve-devel] applied: [PATCH widget-toolkit 1/1] ComboGrid: avoid needing two clicks after reselecting an item Thomas Lamprecht
2023-01-27 10:14 ` [pve-devel] [PATCH manager 1/1] ui: ComboBoxSetStoreNode: don't hide the picker when clicking the toolbar Dominik Csapak
2023-01-31 17:02   ` [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=20230127101436.2200018-2-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