我在基于redux-form
lib。
但是,我每次都需要执行必需步骤才能到达step N
是否可以设置一些模拟状态以直接找到Step N
?
有什么想法和暗示吗?
<SearchStructureBuilderForm
structureList={this.props.dataReducer.structureList}
tableList={this.props.dataReducer.tableList || []}
parentProps={this.props}
onSubmit={this.showResults.bind(this)}>
</SearchStructureBuilderForm>
render() {
let {
parentProps,
} = this.props;
...
}
const mapStateToProps = (state: any) => {
const formData = state.form[FORM_NAME] || {}
const structureList = state.dataReducer.structureList
const email = selector(state, 'email')
const selectedTable = selector(state, 'selectedTable')
const structureName = selector(state, 'structureName')
return {
formData,
structureList,
email,
selectedTable,
structureName,
}
}
export default connect(
mapStateToProps,
mapDispatchToProps
)(reduxForm(formOption)(SearchStructureBuilderForm as any))
答案 0 :(得分:0)