fix event listener callback function

This commit is contained in:
Arthur Lu 2023-01-11 03:02:17 -08:00
parent ba97c056d8
commit c6f8b7542d

View File

@ -75,11 +75,11 @@ async function populateForm (node, type, vmid) {
}); });
addDiskBus.value = diskConfig[type].prefixOrder[0]; addDiskBus.value = diskConfig[type].prefixOrder[0];
handleDiskBusChange(diskConfig); handleDiskBusChange(diskConfig);
addDiskBus.addEventListener("change", handleDiskBusChange()); addDiskBus.addEventListener("change", handleDiskBusChange);
let addDiskDevice = document.querySelector("#add-disk #device"); let addDiskDevice = document.querySelector("#add-disk #device");
addDiskDevice.addEventListener("input", handleDiskDeviceChange()); addDiskDevice.addEventListener("input", handleDiskDeviceChange);
addDiskDevice.addEventListener("focus", handleDiskDeviceChange()); addDiskDevice.addEventListener("focus", handleDiskDeviceChange);
let addDiskStorage = document.querySelector("#add-disk #storage"); let addDiskStorage = document.querySelector("#add-disk #storage");
let addDiskSize = document.querySelector("#add-disk #size"); let addDiskSize = document.querySelector("#add-disk #size");