Feat: sync input variable names to main() function (#21667)

This commit is contained in:
Minamiyama 2025-07-01 10:57:07 +08:00 • committed by GitHub
commit 25de39d9c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 102 additions and 2 deletions

View file

@ -65,10 +65,11 @@ const VarList: FC<Props> = ({
}, [list, onVarNameChange, onChange])
const handleVarReferenceChange = useCallback((index: number) => {
return (value: ValueSelector | string, varKindType: VarKindType) => {
return (value: ValueSelector | string, varKindType: VarKindType, varInfo?: Var) => {
const newList = produce(list, (draft) => {
if (!isSupportConstantValue || varKindType === VarKindType.variable) {
draft[index].value_selector = value as ValueSelector
draft[index].value_type = varInfo?.type
if (isSupportConstantValue)
draft[index].variable_type = VarKindType.variable