1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-18 09:22:18 +03:00

Merge remote-tracking branch 'origin/develop' into rav/base_dialog

This commit is contained in:
Richard van der Hoff
2017-01-25 15:01:11 +00:00
18 changed files with 162 additions and 135 deletions

View File

@ -18,6 +18,11 @@ import React from 'react';
import sdk from '../../../index';
import MatrixClientPeg from '../../../MatrixClientPeg';
/**
* Prompt the user to set a display name.
*
* On success, `onFinished(true, newDisplayName)` is called.
*/
export default React.createClass({
displayName: 'SetDisplayNameDialog',
propTypes: {
@ -42,10 +47,6 @@ export default React.createClass({
this.refs.input_value.select();
},
getValue: function() {
return this.state.value;
},
onValueChange: function(ev) {
this.setState({
value: ev.target.value
@ -54,7 +55,7 @@ export default React.createClass({
onFormSubmit: function(ev) {
ev.preventDefault();
this.props.onFinished(true);
this.props.onFinished(true, this.state.value);
return false;
},