[英]How to get value from an input with reduxForm?
我需要使用 reduxForm 获取输入的值,我正在尝试在 onChange 中使用 function,但没有任何反应,这是使用 react 制作的 class 组件。
我正在尝试这种方式
onOptionChange = (reduxFormFieldOnChange, value) => () => {
reduxFormFieldOnChange(value);
// nothing happens here
console.log(value);
};
render() {
const {
someProps
} = this.props;
return (
<NameInput
className="name"
onChange={this.onOptionChange()}
{...this.getFieldLock(GETLOCK.NAME)}
/>
)
如何获取用户在此输入中输入的值? 真的需要帮助! 谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.