mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-29 17:45:55 +00:00
fix NodeSelector
This commit is contained in:
parent
0ee3bc7a67
commit
04a3ef7ac7
@ -2,6 +2,9 @@ Ext.define('PVE.form.ComboGrid', {
|
|||||||
extend: 'Ext.form.field.ComboBox',
|
extend: 'Ext.form.field.ComboBox',
|
||||||
alias: ['widget.PVE.form.ComboGrid'],
|
alias: ['widget.PVE.form.ComboGrid'],
|
||||||
|
|
||||||
|
// this value is used as default value after load()
|
||||||
|
preferredValue: undefined,
|
||||||
|
|
||||||
computeHeight: function() {
|
computeHeight: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
var lh = PVE.Utils.gridLineHeigh();
|
var lh = PVE.Utils.gridLineHeigh();
|
||||||
@ -100,7 +103,7 @@ Ext.define('PVE.form.ComboGrid', {
|
|||||||
me.setDisabled(false);
|
me.setDisabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
var def = me.getValue();
|
var def = me.getValue() || me.preferredValue;
|
||||||
if (def) {
|
if (def) {
|
||||||
me.setValue(def, true); // sync with grid
|
me.setValue(def, true); // sync with grid
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ Ext.define('PVE.form.NodeSelector', {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (me.selectCurNode && PVE.curSelectedNode.data.node) {
|
if (me.selectCurNode && PVE.curSelectedNode.data.node) {
|
||||||
me.value = PVE.curSelectedNode.data.node;
|
me.preferredValue = PVE.curSelectedNode.data.node;
|
||||||
}
|
}
|
||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
|
Loading…
Reference in New Issue
Block a user