@@ -6,7 +6,6 @@ import { Alert } from "components/Alert/Alert";
6
6
import { ErrorAlert } from "components/Alert/ErrorAlert" ;
7
7
import { Avatar } from "components/Avatar/Avatar" ;
8
8
import { Button } from "components/Button/Button" ;
9
- import { SelectFilter } from "components/Filter/SelectFilter" ;
10
9
import {
11
10
FormFields ,
12
11
FormFooter ,
@@ -42,10 +41,10 @@ import {
42
41
useValidationSchemaForRichParameters ,
43
42
} from "utils/richParameters" ;
44
43
import * as Yup from "yup" ;
44
+ import { Combobox } from "../../components/Combobox/Combobox" ;
45
45
import type { CreateWorkspaceMode } from "./CreateWorkspacePage" ;
46
46
import { ExternalAuthButton } from "./ExternalAuthButton" ;
47
47
import type { CreateWorkspacePermissions } from "./permissions" ;
48
- import { Combobox } from "../../components/Combobox/Combobox" ;
49
48
50
49
export const Language = {
51
50
duplicationWarning :
@@ -384,7 +383,9 @@ export const CreateWorkspacePageView: FC<CreateWorkspacePageViewProps> = ({
384
383
< Stack direction = "column" spacing = { 2 } >
385
384
< Stack direction = "row" spacing = { 2 } >
386
385
< Combobox
387
- value = { presetOptions [ selectedPresetIndex ] ?. displayName || "" }
386
+ value = {
387
+ presetOptions [ selectedPresetIndex ] ?. displayName || ""
388
+ }
388
389
options = { presetOptions }
389
390
placeholder = "Select a preset"
390
391
onSelect = { ( value ) => {
@@ -397,7 +398,10 @@ export const CreateWorkspacePageView: FC<CreateWorkspacePageViewProps> = ({
397
398
setSelectedPresetIndex ( index ) ;
398
399
form . setFieldValue (
399
400
"template_version_preset_id" ,
400
- presetOptions [ index ] . value === "" ? undefined : presetOptions [ index ] . value ,
401
+ // Empty string is equivalent to using None
402
+ presetOptions [ index ] . value === ""
403
+ ? undefined
404
+ : presetOptions [ index ] . value ,
401
405
) ;
402
406
} }
403
407
/>
0 commit comments