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:
balibabu
2025-06-27 18:53:13 +08:00
committed by GitHub
parent 0f7c955634
commit 8e1f8a0c48
6 changed files with 44 additions and 25 deletions

View File

@ -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]);