mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-26 17:16:11 -05:00
Use ReactDOM.findDOMNode for login field values
The direct reference didn't work as expected I think because we're nesting the `input` within our own `Input` components.
This commit is contained in:
parent
abfb485560
commit
13ee5ad86d
1 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
var React = require('react');
|
||||
var ReactDOM = require('react-dom');
|
||||
var FormattedMessage = require('react-intl').FormattedMessage;
|
||||
|
||||
var Input = require('../forms/input.jsx');
|
||||
|
@ -15,8 +16,8 @@ var Login = React.createClass({
|
|||
handleSubmit: function (event) {
|
||||
event.preventDefault();
|
||||
this.props.onLogIn({
|
||||
'username': this.refs.username.value,
|
||||
'password': this.refs.password.value
|
||||
'username': ReactDOM.findDOMNode(this.refs.username).value,
|
||||
'password': ReactDOM.findDOMNode(this.refs.password).value
|
||||
});
|
||||
},
|
||||
render: function () {
|
||||
|
|
Loading…
Reference in a new issue