Merge pull request #478 from rgarmsen2295/mm-2007

MM-2007 Clears the 'New Channel' dialogue box of errors and previous input on exit
Этот коммит содержится в:
Christopher Speller
2015-08-26 09:28:16 -04:00
родитель d653dc18e4 68ba3174fe
Коммит 378f0b52c1

Просмотреть файл

@@ -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: ''};