summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorBastien Durel <bastien.durel@data.fr>2015-08-26 17:01:39 +0200
committerBastien Durel <bastien.durel@data.fr>2015-08-26 17:01:39 +0200
commit2ebbc7a410f205f87e0da77980d413ee1318fb10 (patch)
treed2b643ff2570eb8df45bf23969da1450dea1cb52 /web
parent224e7d1a7b999f4d7c8037844b38f1458f7f673f (diff)
parent378f0b52c10d3b9dc670da34a0043b7e05f3e93c (diff)
downloadchat-2ebbc7a410f205f87e0da77980d413ee1318fb10.tar.gz
chat-2ebbc7a410f205f87e0da77980d413ee1318fb10.tar.bz2
chat-2ebbc7a410f205f87e0da77980d413ee1318fb10.zip
Merge branch 'master' of github.com:mattermost/platform
Diffstat (limited to 'web')
-rw-r--r--web/react/components/new_channel.jsx11
1 files changed, 11 insertions, 0 deletions
diff --git a/web/react/components/new_channel.jsx b/web/react/components/new_channel.jsx
index 38c9ea76d..fc24a7cdc 100644
--- a/web/react/components/new_channel.jsx
+++ b/web/react/components/new_channel.jsx
@@ -84,6 +84,17 @@ module.exports = React.createClass({
var button = e.relatedTarget;
self.setState({channelType: $(button).attr('data-channeltype')});
});
+ $(this.refs.modal.getDOMNode()).on('hidden.bs.modal', this.handleClose);
+ },
+ componentWillUnmount: function() {
+ $(this.refs.modal.getDOMNode()).off('hidden.bs.modal', this.handleClose);
+ },
+ handleClose: function() {
+ $(this.getDOMNode()).find('.form-control').each(function clearForms() {
+ this.value = '';
+ });
+
+ this.setState({channelType: '', displayNameError: '', nameError: '', serverError: '', inValid: false});
},
getInitialState: function() {
return {channelType: ''};