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

changes v2 -> v3:
 * anyMatch allows much nicer matching
 * forceSelection ensures that a valid entry gets submitted
 * replace the manual clearFilter/clearValue with the default clearFilterOnBlur

 www/manager6/form/FileSelector.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/www/manager6/form/FileSelector.js 
b/www/manager6/form/FileSelector.js
index 6dcc24f0..87a80a23 100644
--- a/www/manager6/form/FileSelector.js
+++ b/www/manager6/form/FileSelector.js
@@ -2,6 +2,10 @@ Ext.define('PVE.form.FileSelector', {
     extend: 'PVE.form.ComboGrid',
     alias: 'widget.pveFileSelector',
 
+    editable: true,
+    anyMatch: true,
+    forceSelection: true,
+
     setStorage: function(storage, nodename) {
        var me = this;
 
-- 
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