Feat: Set the outputs type of list operation. #10427 (#11366)

### What problem does this PR solve?

Feat: Set the outputs type of list operation. #10427

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-11-19 13:59:43 +08:00
committed by GitHub
parent 0884e9a4d9
commit 971197d595
8 changed files with 148 additions and 42 deletions

View File

@ -19,6 +19,7 @@ import {
VariableAssignerLogicalOperator,
} from '../../constant';
import { useGetVariableLabelOrTypeByValue } from '../../hooks/use-get-begin-query';
import { getArrayElementType } from '../../utils';
import { DynamicFormHeader } from '../components/dynamic-fom-header';
import { QueryVariable } from '../components/query-variable';
import { useBuildLogicalOptions } from './use-build-logical-options';
@ -152,9 +153,13 @@ export function DynamicVariables({
} else if (
logicalOperator === VariableAssignerLogicalArrayOperator.Append
) {
const subType = type.match(/<([^>]+)>/).at(1);
const subType = getArrayElementType(type);
return (
<QueryVariable types={[subType]} hideLabel pureQuery></QueryVariable>
<QueryVariable
types={[subType as JsonSchemaDataType]}
hideLabel
pureQuery
></QueryVariable>
);
}
},