Feat: Switching the programming language of the code operator will switch the corresponding language template #3221 (#7770)

### What problem does this PR solve?

Feat: Switching the programming language of the code operator will
switch the corresponding language template #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-05-21 18:22:06 +08:00
committed by GitHub
parent 754a5e1cee
commit 558b252c5a
7 changed files with 133 additions and 25 deletions

View File

@ -294,7 +294,13 @@ export const useHandleFormValuesChange = (
useEffect(() => {
const subscription = form?.watch((value, { name, type, values }) => {
if (id && name) {
console.log('🚀 ~ useEffect ~ value:', type, values);
console.log(
'🚀 ~ useEffect ~ value:',
name,
type,
values,
operatorName,
);
let nextValues: any = value;
// Fixed the issue that the related form value does not change after selecting the freedom field of the model
@ -320,8 +326,8 @@ export const useHandleFormValuesChange = (
category_description: buildCategorizeObjectFromList(value.items),
};
}
// Manually triggered form updates are synchronized to the canvas
if (type) {
// Manually triggered form updates are synchronized to the canvas
updateNodeForm(id, nextValues);
}
}