File tree 1 file changed +7
-3
lines changed
client/src/components/pages/flow-detail/node-dialog
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,18 @@ import { useTranslation } from 'react-i18next'
17
17
import { useFlowCtx } from '..'
18
18
19
19
export const SendMailContent = ( ) => {
20
+ const { handleChangeSelectedNode, selectedNode } = useFlowCtx ( )
21
+
20
22
const schema = useBotSendMailSchema ( )
21
23
const form = useForm < TBotSendMail > ( {
22
24
resolver : zodResolver ( schema ) ,
23
25
mode : 'onChange' ,
26
+ defaultValues : {
27
+ subject : selectedNode ?. data . sendMail ?. subject || '' ,
28
+ to : selectedNode ?. data . sendMail ?. to || '' ,
29
+ body : selectedNode ?. data . sendMail ?. body || '' ,
30
+ } ,
24
31
} )
25
- const { handleChangeSelectedNode, selectedNode } = useFlowCtx ( )
26
32
27
33
const { t } = useTranslation ( [ 'forms' , 'common' ] )
28
34
@@ -49,8 +55,6 @@ export const SendMailContent = () => {
49
55
handleChangeSelectedNode ( clonedNode )
50
56
}
51
57
52
- console . log ( selectedNode )
53
-
54
58
return (
55
59
< Form { ...form } >
56
60
< form className = 'space-y-3' onSubmit = { form . handleSubmit ( handleSubmit ) } >
You can’t perform that action at this time.
0 commit comments