diff --git a/app/components/form/fields/ComboboxField.tsx b/app/components/form/fields/ComboboxField.tsx index 4be1afdf1..df580fdd5 100644 --- a/app/components/form/fields/ComboboxField.tsx +++ b/app/components/form/fields/ComboboxField.tsx @@ -41,10 +41,12 @@ export function ComboboxField< allowArbitraryValues, placeholder, // Intent is to not show both a placeholder and a description, while still having good defaults; prefer a description to a placeholder - // If description is provided, use it - // If not, but a placeholder is provided, the default description should be undefined - // If no placeholder is provided and arbitrary values are allowed, the default description should be 'Select an option or enter a custom value' - // If no placeholder is provided and arbitrary values are not allowed, the default description should be 'Select an option' + /* + * If description is provided, use it. + * If not, but a placeholder is provided, the default description should be undefined. + * If no placeholder is provided and arbitrary values are allowed, the default description should be 'Select an option or enter a custom value'. + * If no placeholder is provided and arbitrary values are not allowed, the default description should be 'Select an option'. + */ description = placeholder ? undefined : allowArbitraryValues diff --git a/app/forms/disk-attach.tsx b/app/forms/disk-attach.tsx index b5ab3b22d..7895c81b9 100644 --- a/app/forms/disk-attach.tsx +++ b/app/forms/disk-attach.tsx @@ -57,7 +57,6 @@ export function AttachDiskSideModalForm({ ({ value: name, label: name }))} required diff --git a/app/forms/firewall-rules-common.tsx b/app/forms/firewall-rules-common.tsx index 97c09b9e2..4edc950ed 100644 --- a/app/forms/firewall-rules-common.tsx +++ b/app/forms/firewall-rules-common.tsx @@ -286,14 +286,16 @@ export const CommonFields = ({ control, nameTaken, error }: CommonFieldsProps) = const targetAndHostDefaultValues: TargetAndHostFormValues = { type: 'vpc', value: '' } const { project } = useProjectSelector() // prefetchedApiQueries below are prefetched in firewall-rules-create and -edit - const { data: instancesData } = usePrefetchedApiQuery('instanceList', { + const { + data: { items: instances }, + } = usePrefetchedApiQuery('instanceList', { query: { project, limit: PAGE_SIZE }, }) - const instances = instancesData?.items ?? [] - const { data: vpcData } = usePrefetchedApiQuery('vpcList', { + const { + data: { items: vpcs }, + } = usePrefetchedApiQuery('vpcList', { query: { project, limit: PAGE_SIZE }, }) - const vpcs = vpcData?.items ?? [] // Targets const targetForm = useForm({ defaultValues: targetAndHostDefaultValues }) diff --git a/app/forms/snapshot-create.tsx b/app/forms/snapshot-create.tsx index 50514aea8..008025142 100644 --- a/app/forms/snapshot-create.tsx +++ b/app/forms/snapshot-create.tsx @@ -77,7 +77,6 @@ export function CreateSnapshotSideModalForm() { label="Disk" name="disk" placeholder="Select a disk" - description="" items={diskItems} required control={form.control} diff --git a/app/pages/system/SiloImagesPage.tsx b/app/pages/system/SiloImagesPage.tsx index d2611830c..c8f92d593 100644 --- a/app/pages/system/SiloImagesPage.tsx +++ b/app/pages/system/SiloImagesPage.tsx @@ -170,7 +170,6 @@ const PromoteImageModal = ({ onDismiss }: { onDismiss: () => void }) => {