Feat: Add CrawlerForm component #3221 (#8857)

### What problem does this PR solve?

Feat: Add CrawlerForm component #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-07-15 18:12:00 +08:00
committed by GitHub
parent faebb519f7
commit 9371d7b19c
5 changed files with 77 additions and 29 deletions

View File

@ -31,7 +31,7 @@ import { RAGFlowSelectOptionType } from '../ui/select';
export type SelectWithSearchFlagOptionType = {
label: string;
value?: string;
options: RAGFlowSelectOptionType[];
options?: RAGFlowSelectOptionType[];
};
export type SelectWithSearchFlagProps = {
@ -64,7 +64,9 @@ export const SelectWithSearch = forwardRef<
const selectLabel = useMemo(() => {
const optionTemp = options[0];
if (optionTemp?.options) {
return optionTemp.options.find((opt) => opt.value === value)?.label || '';
return options
.map((group) => group?.options?.find((item) => item.value === value))
.filter(Boolean)[0]?.label;
} else {
return options.find((opt) => opt.value === value)?.label || '';
}