[pve-devel] [PATCH manager 2/3] FileStore: make editable to allow filtering

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Jul 20 14:45:59 CEST 2017


Making this COmboGrid based component editable allows implicit
filtering the backing store.
This is quite helpfull on file selection, as for example the ISO file
selector from the create wizard is.
Clear the filter (and its displayed value) on store reselection, as
there it becomes void - at least this is a simple and easy soltuion
without glitches.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 www/manager6/form/FileSelector.js | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/www/manager6/form/FileSelector.js b/www/manager6/form/FileSelector.js
index 6dcc24f0..85eeff81 100644
--- a/www/manager6/form/FileSelector.js
+++ b/www/manager6/form/FileSelector.js
@@ -2,6 +2,11 @@ Ext.define('PVE.form.FileSelector', {
     extend: 'PVE.form.ComboGrid',
     alias: 'widget.pveFileSelector',
 
+    config: {
+	editable: true,
+	clearFilterOnBlur: false
+    },
+
     setStorage: function(storage, nodename) {
 	var me = this;
 
@@ -30,6 +35,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