fix selecting build for deployment when search for build

This commit is contained in:
beckerinj
2022-09-22 14:15:32 -04:00
parent 87548b577f
commit 22a641c07e
@@ -45,10 +45,10 @@ const Image: Component<{}> = (p) => {
.map((id) => builds.get(id)?.name!)
.filter((val) => val),
]}
onSelect={(build, index) => {
onSelect={(build) => {
setDeployment(
"buildID",
build === "custom image" ? undefined : builds.ids()![index - 1]
build === "custom image" ? undefined : builds.ids()!.find((id) => builds.get(id)?.name === build)
);
}}
position="bottom right"