Ich möchte eine Änderung Aktion in einem FormSection versenden.ReduxForm: 'Änderung' Aktion innerhalb Formular in FormSection
Derzeit mache ich dies in myForm.jsx:
<FormSection name="content">
<MyFormSection sectionName="content" formName="PanelForm"/>
</FormSection>
im Anschluss an diese in MyFormSection.jsx
import { change } from 'redux-form';
// my component...
const mapDispatchToProps = (dispatch, props) => ({
change: (name, value) => dispatch(change(props.formName, props.sectionName+"."+name, value)),
})
Ich mag, um das Formular nicht überliefern sowohl den Namen des Form und der Abschnitt.
Hätte jemand einen besseren Weg, dies zu tun?