Skip to content

Commit

Permalink
fix(clusters): fix creation flow issues (#1160)
Browse files Browse the repository at this point in the history
* fix(clusters): fix installation type selection

https://www.radix-ui.com/primitives/docs/components/radio-group

Radix uses `onValueChange` instead of `onChange` to react to selection
change.

* fix(clusters): hide existing vpc for now
  • Loading branch information
ctjhoa authored Feb 7, 2024
1 parent 84139e3 commit 1e1849d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ interface UseCloudProviderFeaturesProps {
export function useCloudProviderFeatures({ cloudProvider }: UseCloudProviderFeaturesProps) {
return useQuery({
...queries.cloudProviders.features({ cloudProvider }),
select(features) {
// TODO: hide existing VPC feature for now
return features?.filter(({ id }) => id !== 'EXISTING_VPC')
},
})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ export function StepGeneral(props: StepGeneralProps) {
}}
render={({ field }) => (
<BlockContent title="Installation type">
<RadioGroup.Root className="flex flex-col gap-4" defaultValue={field.value} onChange={field.onChange}>
<RadioGroup.Root
className="flex flex-col gap-4"
defaultValue={field.value}
onValueChange={field.onChange}
>
<label className="flex gap-3">
<span>
<RadioGroup.Item value="MANAGED" />
Expand Down

0 comments on commit 1e1849d

Please sign in to comment.