Closed kmid5280 closed 10 months ago
@seankwilliams Give this a try. I tested this fix and it seems to work, though I am a little unfamiliar with using initialValues
in Redux Form. Might want to double check the usage of props vs state in this form just to make sure everything lines up okay.
I should note that previously in mapStateToProps, ownProps.initialValues
was returning undefined and contained no values at all. I didn't see any evidence that ownProps.initialValues
was being used for anything in this form. The new logic basically provides a new value for initialValues. If there is an instance where we need to pass in any values from ownProps.initialValues
we may be able to set up a conditional that will account for that.
This looks great. Nice work, @kmid5280 !
Issue
This issue resolves #866
Description
This form was not correctly initializing the From and To dates when opened. Moved the conditional logic to set the initial date values into mapStateToProps.