1
This commit is contained in:
parent
70f19f230d
commit
0fe5f766c8
@ -299,19 +299,28 @@ const ApplicationModal: React.FC<ApplicationModalProps> = ({
|
|||||||
</Button>
|
</Button>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
<PopoverContent className="w-full p-0">
|
<PopoverContent className="w-[--radix-popover-trigger-width] p-0" side="bottom" align="start">
|
||||||
<Command>
|
<Command className="w-full">
|
||||||
<CommandInput placeholder="搜索代码仓库组..." />
|
<CommandInput
|
||||||
|
placeholder="搜索代码仓库组..."
|
||||||
|
className="h-9"
|
||||||
|
/>
|
||||||
<CommandEmpty>未找到代码仓库组</CommandEmpty>
|
<CommandEmpty>未找到代码仓库组</CommandEmpty>
|
||||||
<CommandGroup>
|
<ScrollArea className="h-[200px] overflow-auto">
|
||||||
<ScrollArea className="h-60">
|
<CommandGroup className="overflow-hidden">
|
||||||
{repositoryGroups.map((group) => (
|
{repositoryGroups.map((group) => (
|
||||||
<CommandItem
|
<CommandItem
|
||||||
value={group.name}
|
|
||||||
key={group.id}
|
key={group.id}
|
||||||
|
value={group.name}
|
||||||
onSelect={() => {
|
onSelect={() => {
|
||||||
form.setValue("repositoryGroupId", group.id);
|
form.setValue("repositoryGroupId", group.id);
|
||||||
|
// 关闭 Popover
|
||||||
|
const popoverTrigger = document.querySelector('[role="combobox"]');
|
||||||
|
if (popoverTrigger) {
|
||||||
|
(popoverTrigger as HTMLElement).click();
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
|
className="cursor-pointer"
|
||||||
>
|
>
|
||||||
<Check
|
<Check
|
||||||
className={cn(
|
className={cn(
|
||||||
@ -324,8 +333,8 @@ const ApplicationModal: React.FC<ApplicationModalProps> = ({
|
|||||||
{group.name}
|
{group.name}
|
||||||
</CommandItem>
|
</CommandItem>
|
||||||
))}
|
))}
|
||||||
</ScrollArea>
|
|
||||||
</CommandGroup>
|
</CommandGroup>
|
||||||
|
</ScrollArea>
|
||||||
</Command>
|
</Command>
|
||||||
</PopoverContent>
|
</PopoverContent>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user