Clear state on new account creation Modal when exited

This commit is contained in:
Aaron Lindsay 2015-07-04 08:34:43 -04:00
parent 7ea9fb3b73
commit 47ff76d868
1 changed files with 2 additions and 0 deletions

View File

@ -66,6 +66,7 @@ const NewAccountModal = React.createClass({
handleCancel: function() {
if (this.props.onCancel != null)
this.props.onCancel();
this.setState(this.getInitialState());
},
handleChange: function() {
this.setState({
@ -96,6 +97,7 @@ const NewAccountModal = React.createClass({
a.Type = this.state.type;
this.handleSaveSettings(a);
this.setState(this.getInitialState());
},
handleSaveSettings: function(account) {
if (this.props.onSubmit != null)