diff --git a/dinky-web/src/pages/DataStudio/CenterTabContent/SqlTask/index.tsx b/dinky-web/src/pages/DataStudio/CenterTabContent/SqlTask/index.tsx index 231e149c20..687f4a37f1 100644 --- a/dinky-web/src/pages/DataStudio/CenterTabContent/SqlTask/index.tsx +++ b/dinky-web/src/pages/DataStudio/CenterTabContent/SqlTask/index.tsx @@ -191,10 +191,10 @@ export const SqlTask = memo((props: FlinkSqlProps & any) => { if (taskDetail.dialect.toLowerCase() === DIALECT.FLINKJAR) { const sqlConvertForm = await flinkJarSqlConvertForm(taskDetail.statement); setSqlForm({ enable: true, ...sqlConvertForm }); - setCurrentState((prevState) => ({ - ...prevState, + setCurrentState({ + ...newParams, statement: sqlConvertForm?.initSqlStatement ?? '' - })); + }); setOriginStatementValue(sqlConvertForm?.initSqlStatement ?? ''); if (params?.statement && params?.statement !== sqlConvertForm?.initSqlStatement) { setDiff([