[pve-devel] [PATCH widget-toolkit V2] ComboGrid: fix sorting when filtering
Matthias Heiserer
m.heiserer at proxmox.com
Wed Mar 16 12:34:18 CET 2022
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 at 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
More information about the pve-devel
mailing list