Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: user cannot click on copy icon of model id #2744

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 22 additions & 16 deletions web/containers/DropdownListSidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 202,7 @@ const DropdownListSidebar = ({
<SelectPortal>
<SelectContent
className={twMerge(
'right-2 block w-full min-w-[450px] pr-0',
'right-2 block w-full min-w-[450px] pr-0',
isTabActive === 1 && '[&_.select-scroll-down-button]:hidden'
)}
>
Expand Down Expand Up @@ -278,21 278,6 @@ const DropdownListSidebar = ({
)}
>
<p className="line-clamp-2 text-xs">{x.id}</p>
{clipboard.copied && copyId === x.id ? (
<CheckIcon
size={16}
className="flex-shrink-0 text-green-600"
/>
) : (
<CopyIcon
size={16}
className="z-20 flex-shrink-0 cursor-pointer"
onClick={() => {
clipboard.copy(x.id)
setCopyId(x.id)
}}
/>
)}
</div>
</div>
<div className="flex-shrink-0 space-x-2">
Expand All @@ -305,6 290,27 @@ const DropdownListSidebar = ({
</div>
</div>
</SelectItem>
<div
className={twMerge(
'absolute -mt-6 ml-4 flex max-w-[200px] items-center space-x-2 text-muted-foreground'
)}
>
<p className="line-clamp-1 flex-1 text-xs text-transparent">
{x.id}
</p>
{clipboard.copied && copyId === x.id ? (
<CheckIcon size={16} className="text-green-600" />
) : (
<CopyIcon
size={16}
className="z-20 cursor-pointer"
onClick={() => {
clipboard.copy(x.id)
setCopyId(x.id)
}}
/>
)}
</div>
</div>
))
)}
Expand Down
Loading