File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
client/src/components/pages/flow-detail/node-dialog Expand file tree Collapse file tree 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'
1717import { useFlowCtx } from '..'
1818
1919export const SendMailContent = ( ) => {
20+ const { handleChangeSelectedNode, selectedNode } = useFlowCtx ( )
21+
2022 const schema = useBotSendMailSchema ( )
2123 const form = useForm < TBotSendMail > ( {
2224 resolver : zodResolver ( schema ) ,
2325 mode : 'onChange' ,
26+ defaultValues : {
27+ subject : selectedNode ?. data . sendMail ?. subject || '' ,
28+ to : selectedNode ?. data . sendMail ?. to || '' ,
29+ body : selectedNode ?. data . sendMail ?. body || '' ,
30+ } ,
2431 } )
25- const { handleChangeSelectedNode, selectedNode } = useFlowCtx ( )
2632
2733 const { t } = useTranslation ( [ 'forms' , 'common' ] )
2834
@@ -49,8 +55,6 @@ export const SendMailContent = () => {
4955 handleChangeSelectedNode ( clonedNode )
5056 }
5157
52- console . log ( selectedNode )
53-
5458 return (
5559 < Form { ...form } >
5660 < form className = 'space-y-3' onSubmit = { form . handleSubmit ( handleSubmit ) } >
You can’t perform that action at this time.
0 commit comments