fix: hidden box dropdown hardware if no list (#3872)

This commit is contained in:
Faisal Amir 2024-10-23 17:52:36 +07:00 committed by GitHub
parent 33eda227a5
commit 0c78aadf1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -315,25 +315,25 @@ const Advanced = () => {
</div>
</div>
{gpuList.length > 0 && (
<div className="mt-2 flex w-full flex-col rounded-lg px-2 py-4">
<label className="mb-2 mr-2 inline-block font-medium">
Choose device(s)
</label>
<div className="relative w-full md:w-1/2" ref={setToggle}>
<Input
value={selectedGpu.join() || ''}
className="w-full cursor-pointer"
readOnly
placeholder=""
suffixIcon={
<ChevronDownIcon
size={14}
className={twMerge(open && 'rotate-180')}
/>
}
onClick={() => setOpen(!open)}
/>
<div className="mt-2 flex w-full flex-col rounded-lg px-2 py-4">
<label className="mb-2 mr-2 inline-block font-medium">
Choose device(s)
</label>
<div className="relative w-full md:w-1/2" ref={setToggle}>
<Input
value={selectedGpu.join() || ''}
className="w-full cursor-pointer"
readOnly
placeholder=""
suffixIcon={
<ChevronDownIcon
size={14}
className={twMerge(open && 'rotate-180')}
/>
}
onClick={() => setOpen(!open)}
/>
{gpuList.length > 0 && (
<div
className={twMerge(
'absolute right-0 top-0 z-20 mt-10 max-h-80 w-full overflow-hidden rounded-lg border border-[hsla(var(--app-border))] bg-[hsla(var(--app-bg))] shadow-sm',
@ -391,9 +391,9 @@ const Advanced = () => {
</div>
</div>
</div>
</div>
)}
</div>
)}
</div>
</div>
)}