mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 21:21:19 +10:00
Pass redux form name from parent component
This commit is contained in:
parent
b473956705
commit
03924667e0
4 changed files with 7 additions and 5 deletions
|
|
@ -127,6 +127,7 @@ class SelectMultipleFilter extends Component {
|
|||
{buttonLabel}
|
||||
</button>
|
||||
<SelectMultipleFilterForm
|
||||
form={`SelectMultipleFilterForm.${name}`}
|
||||
onSubmit={this.handleSubmit}
|
||||
initialValues={namedInitialValues}
|
||||
enableReinitialize={true}
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ SelectMultipleFilterFormComponent.propTypes = {
|
|||
intl: intlShape.isRequired,
|
||||
};
|
||||
|
||||
const defaultFormName = 'SelectMultipleFilterForm';
|
||||
|
||||
export default compose(reduxForm({ form: defaultFormName }), injectIntl)(
|
||||
const SelectMultipleFilterForm = compose(reduxForm({}), injectIntl)(
|
||||
SelectMultipleFilterFormComponent
|
||||
);
|
||||
|
||||
export default SelectMultipleFilterForm;
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ class SelectMultipleFilterMobileComponent extends Component {
|
|||
</button>
|
||||
</div>
|
||||
<SelectMultipleFilterMobileForm
|
||||
form={`SelectMultipleFilterMobileForm.${name}`}
|
||||
className={optionsContainerClass}
|
||||
name={name}
|
||||
options={options}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,6 @@ SelectMultipleFilterMobileFormComponent.propTypes = {
|
|||
).isRequired,
|
||||
};
|
||||
|
||||
const defaultFormName = 'SelectMultipleFilterMobileForm';
|
||||
const SelectMultipleFilterMobileForm = reduxForm({})(SelectMultipleFilterMobileFormComponent);
|
||||
|
||||
export default reduxForm({ form: defaultFormName })(SelectMultipleFilterMobileFormComponent);
|
||||
export default SelectMultipleFilterMobileForm;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue