mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-19 12:06:42 +08:00
Fix: Fixed the issue that the content of the Dropdown section cannot be seen when selecting the next operator #3221 (#8918)
…be seen when selecting the next operator #3221 ### What problem does this PR solve? Fix: Fixed the issue that the content of the Dropdown section cannot be seen when selecting the next operator #3221 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -3,7 +3,6 @@ import { useComposeLlmOptionsByModelTypes } from '@/hooks/llm-hooks';
|
||||
import * as SelectPrimitive from '@radix-ui/react-select';
|
||||
import { forwardRef, memo, useState } from 'react';
|
||||
import { LlmSettingFieldItems } from '../llm-setting-items/next';
|
||||
import { SelectWithSearch } from '../originui/select-with-search';
|
||||
import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover';
|
||||
import { Select, SelectTrigger, SelectValue } from '../ui/select';
|
||||
|
||||
@ -18,21 +17,13 @@ interface IProps {
|
||||
const NextInnerLLMSelect = forwardRef<
|
||||
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
||||
IProps
|
||||
>(({ value, disabled, onChange }, ref) => {
|
||||
>(({ value, disabled }, ref) => {
|
||||
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
|
||||
const modelOptions = useComposeLlmOptionsByModelTypes([
|
||||
LlmModelType.Chat,
|
||||
LlmModelType.Image2text,
|
||||
]);
|
||||
|
||||
return (
|
||||
<SelectWithSearch
|
||||
options={modelOptions}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
></SelectWithSearch>
|
||||
);
|
||||
|
||||
return (
|
||||
<Select disabled={disabled} value={value}>
|
||||
<Popover open={isPopoverOpen} onOpenChange={setIsPopoverOpen}>
|
||||
|
||||
Reference in New Issue
Block a user