mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-25 16:26:51 +08:00
Feat: Fixed the issue where the begin operator parameters could not be submitted during debugging #3221 (#8539)
### What problem does this PR solve? Feat: Fixed the issue where the begin operator parameters could not be submitted during debugging #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -6,6 +6,7 @@ import {
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@/components/ui/form';
|
||||
import { toLower } from 'lodash';
|
||||
import { ReactNode, useMemo } from 'react';
|
||||
import { useFormContext } from 'react-hook-form';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@ -31,7 +32,10 @@ export function QueryVariable({
|
||||
const finalOptions = useMemo(() => {
|
||||
return type
|
||||
? nextOptions.map((x) => {
|
||||
return { ...x, options: x.options.filter((y) => y.type === type) };
|
||||
return {
|
||||
...x,
|
||||
options: x.options.filter((y) => toLower(y.type).startsWith(type)),
|
||||
};
|
||||
})
|
||||
: nextOptions;
|
||||
}, [nextOptions, type]);
|
||||
|
||||
Reference in New Issue
Block a user