ui: lvm-thin: fix not being able to edit the storage

The change handler of the edit config from a displayEditField still
triggers, even if hidden and disabled. This then enables another
editConfig part of a displayEditField, which triggers an error in the
API.

To fix that, simply check if this field is disabled before setting
the other fields value

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Dominik Csapak 2023-03-21 10:16:10 +01:00 committed by Thomas Lamprecht
parent 14be326456
commit bd757b70e1

View File

@ -148,7 +148,7 @@ Ext.define('PVE.storage.LvmThinInputPanel', {
},
change: function(f, value) {
let vgField = this.up('inputpanel').lookup('thinPoolSelector');
if (vgField) {
if (vgField && !f.isDisabled()) {
vgField.setDisabled(!value);
vgField.setVG(value);
vgField.setValue('');