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.lampre...@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


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to