import { connect } from "react-redux"; import { Field, formValueSelector, reduxForm } from "redux-form"; import { RenderMultiline } from "./representationElements"; let RepLPAQuestionnaire = (props) => { return ( <>

{t("myrepresentations:enter-comment-label")}

{/*
{t("myrepresentations:comments-set-out-label")}:
*/}
); }; const selector = formValueSelector("representationForm"); // <-- same as form name RepLPAQuestionnaire = connect((state) => { const representationTypeValue = selector(state, "representationType"); const procedureTypeValue = selector(state, "procedureType"); return { procedureTypeValue, representationTypeValue, }; })(RepLPAQuestionnaire); const mapStateToProps = (state, props) => { return { search: state.search, searchResultsObj: state.searchResultsObj, formData: state.formData, appealType: state.appealType, currentView: state.currentView, myRepresentations: state.myRepresentations, initialValues: state.currentView.caseReference.repDetails, }; }; export default connect(mapStateToProps)( reduxForm({ form: "representationForm", enableReinitialize: true, destroyOnUnmount: false, })(RepLPAQuestionnaire) );