fix(striker-ui): don't remove optional networks upon removing last interface

main
Tsu-ba-me 2 years ago
parent 585030861f
commit 509c411642
  1. 8
      striker-ui/components/NetworkInitForm.tsx

@ -552,18 +552,10 @@ const NetworkInitForm: FC = () => {
networkInterface={networkInterface}
onClose={() => {
interfaces[networkInterfaceIndex] = undefined;
networkInterfaceInputMap[
networkInterfaceUUID
].isApplied = false;
if (
isNetworkOptional &&
interfaces.length === 0
) {
networkInputs.splice(networkIndex, 1);
}
setNetworkInterfaceInputMap({
...networkInterfaceInputMap,
});

Loading…
Cancel
Save