With the current implementation using queryDelay, this means that the change event for the input never completes. This in turn leads to the input panel never changing its dirty status. By using the beforequery event we can simply cancel the query without resorting to the queryDelay hack.
Reported-By: Mira Limbeck <m.limb...@proxmox.com> Signed-off-by: Stefan Hanreich <s.hanre...@proxmox.com> --- www/manager6/form/IPRefSelector.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/www/manager6/form/IPRefSelector.js b/www/manager6/form/IPRefSelector.js index 7e5eea63a..d41cde5f5 100644 --- a/www/manager6/form/IPRefSelector.js +++ b/www/manager6/form/IPRefSelector.js @@ -56,15 +56,6 @@ Ext.define('PVE.form.IPRefSelector', { }, }); - var disable_query_for_ips = function(f, value) { - if (value === null || - value.match(/^\d/)) { // IP address starts with \d - f.queryDelay = 9999999999; // hack: disable with long delay - } else { - f.queryDelay = 10; - } - }; - var columns = []; if (!me.ref_type) { @@ -109,7 +100,9 @@ Ext.define('PVE.form.IPRefSelector', { }, }); - me.on('change', disable_query_for_ips); + me.on('beforequery', function(queryPlan) { + return !(queryPlan.query === null || queryPlan.query.match(/^\d/)); + }); me.callParent(); }, -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel