0
私はreduxフォームを使用しています。私は、入力フィールドに値を入力できないシナリオにあります。何を入力しようとしていても、カーソルはまだ出発点にあります。添付Redux Form - Not able to type anything in inputReduxフォームの入力コンポーネントに何も入力できません
が私のコードです:
私の質問は、一種の同様のことです。
どれヘルプをいただければ幸いです:添付
import React,{ Component } from 'react';
import { Field, reduxForm, Form } from 'redux-form';
class Login extends Component {
handleFormSubmit = (e) => {
//handling login data.
console.log('hi');
console.log(e);
};
render() {
// console.log(this.props);
console.log(this.props);
const {handleSubmit, fields:{email}} = this.props;
return (
<Form onSubmit ={handleSubmit(this.handleFormSubmit.bind(this))}>
<fieldset className="form-group">
<label>Email:</label>
<Field name="email" component="input" type="text"
className="form-control" {...email}/>
</fieldset>
<button type="submit" className="btn btn-lg btn-primary">
SignIn
</button>
</Form>
);
}
}
export default reduxForm({
form: 'LoginForm',
fields: ['email']
})(Login);
私のpackage.json添付
は私のシナリオです。
間違いはありますか?そして、このオブジェクトに '{... email}'が入っていますか? –