devosend commented on code in PR #9828:
URL: https://github.com/apache/dolphinscheduler/pull/9828#discussion_r860625079


##########
dolphinscheduler-ui-next/src/views/datasource/list/use-detail.ts:
##########
@@ -50,7 +50,7 @@ export function useDetail(getFieldsValue: Function) {
     const dataSourceRes = await queryDataSource(id)
     status.loading = false
     PREV_NAME = dataSourceRes.name
-    return dataSourceRes
+    return dataSourceRes as IDataSource

Review Comment:
   Why did you modify it?



##########
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: JSON.stringify(values.other)

Review Comment:
   `values.other` may be null.  You should judge it.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to