Skip to content

Commit

Permalink
fix: hidden box dropdown hardware if no list
Browse files Browse the repository at this point in the history
  • Loading branch information
urmauur committed Oct 23, 2024
1 parent 33eda22 commit db40dcc
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions web/screens/Settings/Advanced/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -391,9 +391,9 @@ const Advanced = () => {
</div>
</div>
</div>
</div>
)}
</div>
)}
</div>
</div>
)}

Expand Down

0 comments on commit db40dcc

Please sign in to comment.