getFieldDecorator("bindSelect", {initialValue: getFieldValue("binds").map(item => item.title) })(
<Select mode="multiple" onDeselect={this.removeBindItem} onSelect={this.selectBindItem} filterOption={false}>
{this.state.bindItems.map(item =>
<Select.Option id={item._id} title={item.title} key={item._id} value={item.title}>{item.title}</Select.Option>
)}
</Select>
)
Option can set the onDeselect, onSelect, onSearch event of the custom property id, title, code.,Select selector
function(value, option)
complex data objects can be obtained through option. This is great!
however, it can only be a string when setting the default value of Select through the two-way binding of the form.
because the values retrieved by Option in real time may have the same title but different attributes, you want to initialize the values that you want to have in addition to having text,. How do I do that?