fix: select a useable instance type for initial

This commit is contained in:
jialin
2026-05-26 22:40:02 +08:00
committed by jialin
parent 7f14eb544c
commit a51f44c135
3 changed files with 21 additions and 7 deletions
@@ -200,9 +200,13 @@ const AddModal: React.FC<AddModalProps> = ({
}
return;
}
if (!instanceTypes.length) return;
const first = instanceTypes[0];
const first = instanceTypes.find((item) => !item.disabled);
if (!first) return;
// On create, auto-select the first instance type in the list
const template = findTemplateByManufacturer(
first.spec?.manufacturer,
templates