You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/04/28 09:54:20 UTC

[GitHub] [dolphinscheduler] SnowMoon-Dev commented on a diff in pull request #9828: [Fix] json object serialization error

SnowMoon-Dev commented on code in PR #9828:
URL: https://github.com/apache/dolphinscheduler/pull/9828#discussion_r860702641


##########
dolphinscheduler-ui-next/src/views/datasource/list/use-form.ts:
##########
@@ -138,9 +139,15 @@ export function useForm(id?: number) {
   const resetFieldsValue = () => {
     state.detailForm = { ...initialValues }
   }
-  const setFieldsValue = (values: object) => {
-    state.detailForm = { ...state.detailForm, ...values }
+
+  const setFieldsValue = (values: IDataSource) => {
+    state.detailForm = {
+      ...state.detailForm,
+      ...values,
+      other: values.other ? JSON.stringify(values.other) : ''

Review Comment:
   Thanks for the guidance



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org