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:
Ray Schamp 2015-10-20 15:24:56 -04:00
parent abfb485560
commit 13ee5ad86d

View file

@ -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 () {