Hi
I have a form where the user can either 'Send' or 'Send & Archive' a conversation.
I was to bind an 'archive' flag to the onSubmit callback when the user clicks the Send & Archive, but the parameters are overwritten by the formvalues provided by ReduxForm
How can this be accomplished?
How's this?
const makeSender = archive =>
(values, dispatch) => {
dispatch(send({
...values,
archive
}))
}
}
<button onClick={handleSubmit(makeSender(false))}>Send</button>
<button onClick={handleSubmit(makeSender(true))}>Send & Archive</button>
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
How's this?