Password not trigger onChange event

UI Components for React
Post Reply
numankayali
Posts: 6
Joined: 08 Dec 2016, 09:29

04 Nov 2017, 20:23

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!

merve7
Posts: 861
Joined: 12 Sep 2017, 10:44

06 Nov 2017, 16:43

Fixed for next version.

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 16 guests