likyh commented on code in PR #4792:
URL: 
https://github.com/apache/incubator-devlake/pull/4792#discussion_r1150058331


##########
config-ui/src/plugins/components/transformation-form/index.tsx:
##########
@@ -109,10 +112,19 @@ export const TransformationForm = ({ plugin, 
connectionId, id, onCancel }: Props
         {plugin === 'bitbucket' && (
           <BitbucketTransformation transformation={transformation} 
setTransformation={setTransformation} />
         )}
+
+        {plugin === 'tapd' && (
+          <TapdTransformation
+            connectionId={connectionId}
+            scopeId={scopeId}
+            transformation={transformation}
+            setTransformation={setTransformation}
+          />
+        )}
       </Card>
 
       <S.Btns>
-        <Button outlined intent={Intent.PRIMARY} text="Cancel" 
onClick={onCancel} />
+        <Button outlined intent={Intent.PRIMARY} text="Cancel" onClick={() => 
onCancel?.(undefined)} />

Review Comment:
   Because onCancel is used in Line 62. To keep params is a 
`transformationRule?`, I call it without event.
   ```
   const { operating, onSubmit } = useOperator(
     (payload) =>
       id
         ? API.updateTransformation(plugin, connectionId, id, payload)
         : API.createTransformation(plugin, connectionId, payload),
     {
       callback: onCancel,
       formatMessage: () => 'Transformation created successfully',
     },
   );
   ```



-- 
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