I have to clear the Account field if I change the Partner field. How can I do this with the onSubmit event using Redux-form?
Example code:
<form onSubmit={handleSubmit}>
<BoxBlock>
<Row>
<Col md={3}>
<Field
name={FORM_FILTER_NAMES.PARTNER}
label="Partner"
placeholder="Choose a partner"
/>
</Col>
<Col md={3}>
<Field
component={MultiSelect}
name={FORM_FILTER_NAMES.ACCOUNT}
label="Account"
options={sortedAccounts}
placeholderOption="Choose account"
loaded={accountsLoaded}
isSearchable
/>
</Col>
</Row>
<div className="d-flex justify-content-between">
<Button
className="pull-right"
bsStyle="primary"
type="submit"
disabled={submitting || pristine}
>
Filter
</Button>
</div>
</BoxBlock>
</form>