Hi there! I am trying to code a login page. I want to use 1 InputText for username and 1 Password for password. I can read username from InputText but can not read password because event is not triggered. My code:
constructor() {
super();
this.state = {
username: null,
password: null
};
this.handleLoginClick = this.handleLoginClick.bind(this);
}
<InputText onChange={(e) => this.handleOnUsernameChange(e)}/>
// this one works
handleOnUsernameChange(event) {
this.setState({
username: event.currentTarget.value
});
}
<Password feedback={false} onChange={(e) => this.handlePasswordChange(e)}/>
// this one not!
handlePasswordChange(event) {
this.setState({
password: event.currentTarget.value
});
}
thanks for your support!
Password not trigger onChange event
-
- Information
-
Who is online
Users browsing this forum: Google [Bot] and 14 guests