Commit 631316a2 authored by Dietmar Maurer's avatar Dietmar Maurer

fix NodeSelector

parent d0710a63
......@@ -2,6 +2,9 @@ Ext.define('PVE.form.ComboGrid', {
extend: 'Ext.form.field.ComboBox',
alias: ['widget.PVE.form.ComboGrid'],
// this value is used as default value after load()
preferredValue: undefined,
computeHeight: function() {
var me = this;
var lh = PVE.Utils.gridLineHeigh();
......@@ -100,7 +103,7 @@ Ext.define('PVE.form.ComboGrid', {
me.setDisabled(false);
}
var def = me.getValue();
var def = me.getValue() || me.preferredValue;
if (def) {
me.setValue(def, true); // sync with grid
}
......
......@@ -80,7 +80,7 @@ Ext.define('PVE.form.NodeSelector', {
});
if (me.selectCurNode && PVE.curSelectedNode.data.node) {
me.value = PVE.curSelectedNode.data.node;
me.preferredValue = PVE.curSelectedNode.data.node;
}
me.callParent();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment