【发布时间】:2019-02-28 07:44:21
【问题描述】:
我正在使用带有 react-select 的 redux-forms 文件。更改值后,onChange 函数会显示该值。我想检查该值,对于特定值,打开一个对话框让用户确认选择。
import SelectBox from "react-select"
const checkValue= (e) => {
console.log(e.target.value)
}
const Select= ({...props }) => (
<Field
{...props}
component={SelectBox}
onChange={e => checkValue(e)}
items={myItems}
})}
/>
)
【问题讨论】:
-
请检查我的答案,它适合你吗?
标签: reactjs redux-form react-select