-
Notifications
You must be signed in to change notification settings - Fork 763
Open
Labels
Description
In have this code
cf = ConversationalForm.startTheConversation({
options: {
theme: 'green',
submitCallback: submitCallback,
preventAutoFocus: true,
},
tags: tags,
});
ref.current.appendChild(cf.el);
return function unMount() {
cf.remove();
};
}, []);
I would like to pass an argument to submitCallback in order to use it in the function:
function submitCallback(uniqueId) {
var formData = cf.getFormData(true);
cf.addRobotChatResponse("Listo!")
actions.updateCompanyAction({
id: uniqueId,
name: formData.name,
country: formData.country,
sites: formData.sites
});
}
Is that possible?
Thanks!
Great library by the way...!