2016-12-30 27 views
0

私はreduxフォームを使用しています。私は、入力フィールドに値を入力できないシナリオにあります。何を入力しようとしていても、カーソルはまだ出発点にあります。添付Redux Form - Not able to type anything in inputReduxフォームの入力コンポーネントに何も入力できません

が私のコードです:

私の質問は、一種の同様のことです。

Login.js: enter image description here

どれヘルプをいただければ幸いです:添付

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添付

enter image description here

は私のシナリオです。

+0

間違いはありますか?そして、このオブジェクトに '{... email}'が入っていますか? –

答えて

0

v5v6を使用しています。

メソッドで変数emailを取り除いても問題ありません。

関連する問題