Answer the question
In order to leave comments, you need to log in
How to add new value to FormSection in redux-form?
one.
const formValues = (state: ApplicationState) => getFormValues('valuationReport')(state); // форма (не имеет своего FormSection)
const formSelector = createSelector(
formValues,
(values: Object) => get(values, 'reporterCompany'), // создаем селектор для секции формы
);
const mapDispatchToProps = {
changeField: (field, value) => (dispatch) => {
dispatch(change('valuationReport.reporterCompany', field, value)); // прокидываю ф-цию в пропсы компонента
},
};
export const LienPageValuationReportController = compose(
connect(
mapStateToProps, mapDispatchToProps
),
reduxForm({
form: 'valuationReport',
destroyOnUnmount: false,
}),
)(LienPageValuationReportContainer);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question