Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit61b6562

Browse files
authored
feat: display descriptions in multi-select component (#18730)
<img width="528" alt="Screenshot 2025-07-02 at 23 06 51"src="https://github.com/user-attachments/assets/d6223d99-bc1b-4325-8eb6-d87a687bcec8"/>
1 parentdb8ed00 commit61b6562

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

‎site/src/components/MultiSelectCombobox/MultiSelectCombobox.tsx‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@ import {
1111
CommandItem,
1212
CommandList,
1313
}from"components/Command/Command";
14+
import{
15+
Tooltip,
16+
TooltipContent,
17+
TooltipProvider,
18+
TooltipTrigger,
19+
}from"components/Tooltip/Tooltip";
1420
import{useDebouncedValue}from"hooks/debounce";
15-
import{ChevronDown,X}from"lucide-react";
21+
import{ChevronDown,Info,X}from"lucide-react";
1622
import{
1723
typeComponentProps,
1824
typeComponentPropsWithoutRef,
@@ -33,6 +39,7 @@ export interface Option {
3339
label:string;
3440
icon?:string;
3541
disable?:boolean;
42+
description?:string;
3643
/** fixed option that can't be removed. */
3744
fixed?:boolean;
3845
/** Group the options by providing key. */
@@ -662,6 +669,23 @@ export const MultiSelectCombobox = forwardRef<
662669
/>
663670
)}
664671
{option.label}
672+
{option.description&&(
673+
<TooltipProviderdelayDuration={100}>
674+
<Tooltip>
675+
<TooltipTriggerasChild>
676+
<spanclassName="flex items-center pointer-events-auto">
677+
<InfoclassName="!w-3.5 !h-3.5 text-content-secondary"/>
678+
</span>
679+
</TooltipTrigger>
680+
<TooltipContent
681+
side="right"
682+
sideOffset={10}
683+
>
684+
{option.description}
685+
</TooltipContent>
686+
</Tooltip>
687+
</TooltipProvider>
688+
)}
665689
</div>
666690
</CommandItem>
667691
);

‎site/src/modules/workspaces/DynamicParameter/DynamicParameter.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@ const ParameterField: FC<ParameterFieldProps> = ({
488488
value:opt.value.value,
489489
label:opt.name,
490490
icon:opt.icon,
491+
description:opt.description,
491492
disable:false,
492493
}));
493494

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp