mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-12-02 03:47:28 -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 React = require('react');
|
||||||
|
var ReactDOM = require('react-dom');
|
||||||
var FormattedMessage = require('react-intl').FormattedMessage;
|
var FormattedMessage = require('react-intl').FormattedMessage;
|
||||||
|
|
||||||
var Input = require('../forms/input.jsx');
|
var Input = require('../forms/input.jsx');
|
||||||
|
@ -15,8 +16,8 @@ var Login = React.createClass({
|
||||||
handleSubmit: function (event) {
|
handleSubmit: function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.props.onLogIn({
|
this.props.onLogIn({
|
||||||
'username': this.refs.username.value,
|
'username': ReactDOM.findDOMNode(this.refs.username).value,
|
||||||
'password': this.refs.password.value
|
'password': ReactDOM.findDOMNode(this.refs.password).value
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
render: function () {
|
render: function () {
|
||||||
|
|
Loading…
Reference in a new issue