From 47ff76d868cdca1a6d18299eea01a9389c9d57fc Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Sat, 4 Jul 2015 08:34:43 -0400 Subject: [PATCH] Clear state on new account creation Modal when exited --- static/accounts.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static/accounts.js b/static/accounts.js index 1f7a3f9..9ce2906 100644 --- a/static/accounts.js +++ b/static/accounts.js @@ -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)