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

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Jul 25 16:26:58 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 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





More information about the pve-devel mailing list