Skip to content

Commit

Permalink
fix(instance) select 1st pool when configuring root storage in instan…
Browse files Browse the repository at this point in the history
…ce or profile forms #342
  • Loading branch information
edlerd committed May 17, 2023
1 parent e866938 commit c380853
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pages/instances/forms/RootStorageForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const RootStorageForm: FC<Props> = ({ formik, project }) => {
type: "disk",
name: "root",
path: "/",
pool: storagePools[0]?.name ?? undefined,
});
formik.setFieldValue("devices", copy);
setTimeout(() => document.getElementById("rootStoragePool")?.focus(), 100);
Expand All @@ -83,6 +84,7 @@ const RootStorageForm: FC<Props> = ({ formik, project }) => {
return {
label: storagePool.name,
value: storagePool.name,
disabled: false,
};
});
options.unshift({
Expand All @@ -91,6 +93,7 @@ const RootStorageForm: FC<Props> = ({ formik, project }) => {
? "No storage pool available"
: "Select option",
value: "",
disabled: true,
});
return options;
};
Expand Down

0 comments on commit c380853

Please sign in to comment.