From: Matthias Heiserer <m.heiserer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH widget-toolkit V2] ComboGrid: fix sorting when filtering
Date: Wed, 16 Mar 2022 12:34:18 +0100 [thread overview]
Message-ID: <20220316113418.748393-1-m.heiserer@proxmox.com> (raw)
When clicking on a column to sort it, the filter doesn't reset.
Previously, it forgot the filter until the value was changed.
Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
---
Changes from v1:
Introduce a config property to (en|dis)disable clearing the filter
src/form/ComboGrid.js | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/form/ComboGrid.js b/src/form/ComboGrid.js
index 33c1d75..fa1078d 100644
--- a/src/form/ComboGrid.js
+++ b/src/form/ComboGrid.js
@@ -12,6 +12,9 @@ Ext.define('Proxmox.form.ComboGrid', {
// this value is used as default value after load()
preferredValue: undefined,
+ clearFilterOnBlur: false,
+ clearFilterOnExit: true,
+
// hack: allow to select empty value
// seems extjs does not allow that when 'editable == false'
@@ -470,4 +473,12 @@ Ext.define('Proxmox.form.ComboGrid', {
}
});
},
+
+ listeners: {
+ collapse: function() {
+ if (this.clearFilterOnExit) {
+ this.clearLocalFilter();
+ }
+ },
+ },
});
--
2.30.2
next reply other threads:[~2022-03-16 11:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 11:34 Matthias Heiserer [this message]
2022-04-27 10:01 ` Thomas Lamprecht
2022-04-28 9:57 ` Matthias Heiserer
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=20220316113418.748393-1-m.heiserer@proxmox.com \
--to=m.heiserer@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