Skip to content

Commit 835c04c

Browse files
committed
fix #8158 -- GPU selector resets spot-standard selector
1 parent 411b996 commit 835c04c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/packages/frontend/compute/google-cloud-config.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,9 @@ function Provisioning({ priceData, setConfig, configuration, disabled }) {
794794
</Radio.Button>
795795
<Radio.Button value="standard">
796796
Standard{" "}
797-
{prices != null ? `${currency(prices.standard)}/hour` : undefined}{" "}
797+
{prices != null
798+
? `${currency(prices.standard)}/hour`
799+
: undefined}{" "}
798800
</Radio.Button>
799801
</Radio.Group>
800802
<div style={{ color: "#666", marginTop: "5px" }}>
@@ -1212,7 +1214,10 @@ function GPU({
12121214
if (!!acceleratorType) {
12131215
setConfig({ acceleratorType: "", acceleratorCount: 0 });
12141216
} else {
1215-
setConfig(DEFAULT_GPU_CONFIG);
1217+
setConfig({
1218+
...DEFAULT_GPU_CONFIG,
1219+
spot: configuration?.spot ?? false,
1220+
});
12161221
}
12171222
}}
12181223
/>

0 commit comments

Comments
 (0)