when editing the pci mapping, we set the nodename of the pci/usbselector
to the selected node. At the same time we disable and hide the node
selector, but it still changes it's value to the 'first' node
(alphabetically sorted) and that triggers a change event.
To prevent that we accidentally set the node of the pci/usbselector
too, we need to check here if the field is disabled.
There seems to be a race when loading the nodes for the nodeselector
which leads to inconsistent behaviour, so this was only encountered for
the pciselector, but theoretically it could also happen for the
usbselector so adding that condition to both.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
this.lookup('pciselector').setMdev(value);
},
- nodeChange: function(_field, value) {
- this.lookup('pciselector').setNodename(value);
+ nodeChange: function(field, value) {
+ if (!field.isDisabled()) {
+ this.lookup('pciselector').setNodename(value);
+ }
},
pciChange: function(_field, value) {
usbsel.setDisabled(!value);
},
- nodeChange: function(_field, value) {
- this.lookup('id').setNodename(value);
- this.lookup('path').setNodename(value);
+ nodeChange: function(field, value) {
+ if (!field.isDisabled()) {
+ this.lookup('id').setNodename(value);
+ this.lookup('path').setNodename(value);
+ }
},