diff --git a/packages/manager/src/features/Volumes/VolumeDrawer/ConfigSelect.tsx b/packages/manager/src/features/Volumes/VolumeDrawer/ConfigSelect.tsx index 3e7ec93a784..8f41357c8b4 100644 --- a/packages/manager/src/features/Volumes/VolumeDrawer/ConfigSelect.tsx +++ b/packages/manager/src/features/Volumes/VolumeDrawer/ConfigSelect.tsx @@ -10,7 +10,7 @@ interface Props { linodeId: null | number; name: string; onBlur: (e: any) => void; - onChange: (value: number) => void; + onChange: (value: number | undefined) => void; value: null | number; width?: number; } @@ -63,14 +63,12 @@ export const ConfigSelect = React.memo((props: Props) => { : 'No options.' } onChange={(_, selected) => { - onChange(+selected.value); + onChange(selected !== null ? +selected?.value : undefined); }} value={ - value && value !== -1 - ? configList?.find((thisConfig) => thisConfig.value === value) - : { label: '', value: -1 } + configList?.find((thisConfig) => thisConfig.value === value) ?? null } - disableClearable + clearIcon={null} id={name} isOptionEqualToValue={(option, value) => option.value === value.value} label="Config"