]> git.proxmox.com Git - pve-manager.git/commitdiff
ext6migrate: fix picker dropdown on ViewSelector initial load
authorEmmanuel Kasper <e.kasper@proxmox.com>
Wed, 27 Jan 2016 13:13:00 +0000 (14:13 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 27 Jan 2016 15:53:12 +0000 (16:53 +0100)
This fixes a nasty bug where an initial click on the  ViewSelector
trigger would display the picker but hide it immediatly afterwards.

What was happening behind the scene, is that without queryMode 'local',
the store bound to the picker was loaded on each picker display.

Loading the store would then trigger our onLoad() override in ToolKit.js
which called setValue(), which fired a bunch of unwanted events
including 'collapse'.

It is safe here not to call onLoad() to set an initial value, because
the initial value is set in initComponent() (value: groupdef[0][0])

www/manager6/form/ViewSelector.js

index 3a80a3d073494f2da84cad9f195efc2c29ce3f47..202c3cca226d219ef5afe378c9c5a3a861495457 100644 (file)
@@ -12,6 +12,7 @@ Ext.define('PVE.form.ViewSelector', {
     valueField: 'key',
     displayField: 'value',
     hideLabel: true,
+    queryMode: 'local',
 
     initComponent: function() {
        var me = this;