From 13ee5ad86d25aeee983db7e78092401ed914b342 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Tue, 20 Oct 2015 15:24:56 -0400 Subject: [PATCH] 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. --- src/components/login/login.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/login/login.jsx b/src/components/login/login.jsx index 9df04b554..65860fc65 100644 --- a/src/components/login/login.jsx +++ b/src/components/login/login.jsx @@ -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 () {