从ReactSelect中选择或更改选项后 电子邮件字段(实际上,所有其他字段都将被清除)
怎么回事?
<Field
name="email"
component="input"
type="email"
placeholder="Email"
/>
<Field
name="selectedTable"
value={selectedTable}
tableList={this.props.tableList}
selectTableChange={this.props.selectTable}
component={TableNameSelect}
/>
import * as React from 'react'
import {connect} from 'react-redux'
import {Field} from 'redux-form'
import * as ReactSelect from 'react-select';
<ReactSelect
{...input}
value={input.value}
options={tableListOptions}
placeholder="Select Table..."
onChange={(option:any)=>{
selectTableChange(option.value)
input.onChange(option)
}}
onBlur={
(e:any) => {
input.onBlur(input.value)
console.log(this.props)
}
}
/>