[pve-devel] [PATCH manager v2 3/4] FileStore: make editable to allow filtering
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Jul 24 14:49:36 CEST 2017
Making this ComboGrid based component editable allows implicit
filtering the backing store.
This is quite helpful on file selection, as for example the ISO file
selector from the create wizard is.
Clear the filter (and its displayed value) on store selection change,
as there the filter becomes void - at least this is a simple and easy
solution without glitches.
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
Changes v1 -> v2:
* do not use config element to set our defaults
www/manager6/form/FileSelector.js | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/www/manager6/form/FileSelector.js b/www/manager6/form/FileSelector.js
index 6dcc24f0..1f781d70 100644
--- a/www/manager6/form/FileSelector.js
+++ b/www/manager6/form/FileSelector.js
@@ -2,6 +2,9 @@ Ext.define('PVE.form.FileSelector', {
extend: 'PVE.form.ComboGrid',
alias: 'widget.pveFileSelector',
+ editable: true,
+ clearFilterOnBlur: false,
+
setStorage: function(storage, nodename) {
var me = this;
@@ -30,6 +33,11 @@ Ext.define('PVE.form.FileSelector', {
url: url
});
+ if (change) {
+ me.store.clearFilter();
+ me.clearValue();
+ }
+
me.store.load();
},
--
2.11.0
More information about the pve-devel
mailing list