我在反应器的减速器下有这个。
console.log( this.props.reducer.OEMTypes)
OEMTypes: Array(2)
0:
id: "11112"
car_id: "867"
store_id: "DEMO04"
car_type: "FD"
car_type_category_id: "58"
car_type_category: "ACP"
label: "FD"
unassigned: false
__proto__: Object
我把这个作为一个道具传递给我在React中的多选择字段。
<Col xs={3}>
<MultiSelect
name="car_brands"
isLoading={this.props.reducer.loading}
selectAllLabel={"Select All"}
selected={this.props.values.oem_brands}
options={this.props.reducer.CARTypes}
onSelectedChanged={this.handleCARSelect}
当我渲染我的字段时,会得到这样的结果
label: "FD"
我希望能够渲染
car_type_category: "ACP"
什么是最好的方式来实现这一点?