From 42caec326fe5b6f4a0a2fe73e4cf2ba26ecba23d Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sun, 26 Mar 2023 22:09:05 +0100 Subject: bug(web): Do not allow selection of empty unit This change fixes #138 which reports that when adding a unit to a machine, if the user does not select a unit and presses add, the UI will crash. We now disable the add button until the user has selected a unit. --- .../src/components/topologies/sidebar/machine/UnitAddComponent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'opendc-web/opendc-web-ui/src/components/topologies/sidebar') diff --git a/opendc-web/opendc-web-ui/src/components/topologies/sidebar/machine/UnitAddComponent.js b/opendc-web/opendc-web-ui/src/components/topologies/sidebar/machine/UnitAddComponent.js index 4507b409..18cba23a 100644 --- a/opendc-web/opendc-web-ui/src/components/topologies/sidebar/machine/UnitAddComponent.js +++ b/opendc-web/opendc-web-ui/src/components/topologies/sidebar/machine/UnitAddComponent.js @@ -27,7 +27,7 @@ function UnitAddComponent({ units, onAdd }) { ))} - -- cgit v1.2.3