@@ -37,6 +37,7 @@ import {
3737import { AccordionItem } from '~/components/AccordionItem'
3838import { DocsPopover } from '~/components/DocsPopover'
3939import { CheckboxField } from '~/components/form/fields/CheckboxField'
40+ import { ComboboxField } from '~/components/form/fields/ComboboxField'
4041import { DescriptionField } from '~/components/form/fields/DescriptionField'
4142import { DiskSizeField } from '~/components/form/fields/DiskSizeField'
4243import {
@@ -45,7 +46,6 @@ import {
4546} from '~/components/form/fields/DisksTableField'
4647import { FileField } from '~/components/form/fields/FileField'
4748import { BootDiskImageSelectField as ImageSelectField } from '~/components/form/fields/ImageSelectField'
48- import { ListboxField } from '~/components/form/fields/ListboxField'
4949import { NameField } from '~/components/form/fields/NameField'
5050import { NetworkInterfaceField } from '~/components/form/fields/NetworkInterfaceField'
5151import { NumberField } from '~/components/form/fields/NumberField'
@@ -150,16 +150,14 @@ const baseDefaultValues: InstanceCreateInput = {
150150 externalIps : [ { type : 'ephemeral' } ] ,
151151}
152152
153- const DISK_FETCH_LIMIT = 1000
154-
155153CreateInstanceForm . loader = async ( { params } : LoaderFunctionArgs ) => {
156154 const { project } = getProjectSelector ( params )
157155 await Promise . all ( [
158156 // fetch both project and silo images
159157 apiQueryClient . prefetchQuery ( 'imageList' , { query : { project } } ) ,
160158 apiQueryClient . prefetchQuery ( 'imageList' , { } ) ,
161159 apiQueryClient . prefetchQuery ( 'diskList' , {
162- query : { project, limit : DISK_FETCH_LIMIT } ,
160+ query : { project, limit : ALL_ISH } ,
163161 } ) ,
164162 apiQueryClient . prefetchQuery ( 'currentUserSshKeyList' , { } ) ,
165163 apiQueryClient . prefetchQuery ( 'projectIpPoolList' , { query : { limit : ALL_ISH } } ) ,
@@ -197,7 +195,7 @@ export function CreateInstanceForm() {
197195 const defaultImage = allImages [ 0 ]
198196
199197 const allDisks = usePrefetchedApiQuery ( 'diskList' , {
200- query : { project, limit : DISK_FETCH_LIMIT } ,
198+ query : { project, limit : ALL_ISH } ,
201199 } ) . data . items
202200 const disks = useMemo (
203201 ( ) => allDisks . filter ( diskCan . attach ) . map ( ( { name } ) => ( { value : name , label : name } ) ) ,
@@ -548,7 +546,7 @@ export function CreateInstanceForm() {
548546 />
549547 </ div >
550548 ) : (
551- < ListboxField
549+ < ComboboxField
552550 label = "Disk"
553551 name = "diskSource"
554552 description = "Existing disks that are not attached to an instance"
0 commit comments