diff options
Diffstat (limited to 'webapp/components/new_channel_flow.jsx')
-rw-r--r-- | webapp/components/new_channel_flow.jsx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/webapp/components/new_channel_flow.jsx b/webapp/components/new_channel_flow.jsx index c6c265725..b37e6cf35 100644 --- a/webapp/components/new_channel_flow.jsx +++ b/webapp/components/new_channel_flow.jsx @@ -53,6 +53,7 @@ class NewChannelFlow extends React.Component { super(props); this.doSubmit = this.doSubmit.bind(this); + this.onModalExited = this.onModalExited.bind(this); this.typeSwitched = this.typeSwitched.bind(this); this.urlChangeRequested = this.urlChangeRequested.bind(this); this.urlChangeSubmitted = this.urlChangeSubmitted.bind(this); @@ -117,8 +118,11 @@ class NewChannelFlow extends React.Component { member: data2.member }); + this.doOnModalExited = () => { + browserHistory.push(TeamStore.getCurrentTeamRelativeUrl() + '/channels/' + data2.channel.name); + }; + this.props.onModalDismissed(); - browserHistory.push(TeamStore.getCurrentTeamRelativeUrl() + '/channels/' + data2.channel.name); } ); }, @@ -143,6 +147,11 @@ class NewChannelFlow extends React.Component { } ); } + onModalExited() { + if (this.doOnModalExited) { + this.doOnModalExited(); + } + } typeSwitched() { if (this.state.channelType === 'P') { this.setState({channelType: 'O'}); @@ -223,6 +232,7 @@ class NewChannelFlow extends React.Component { serverError={this.state.serverError} onSubmitChannel={this.doSubmit} onModalDismissed={this.props.onModalDismissed} + onModalExited={this.onModalExited} onTypeSwitched={this.typeSwitched} onChangeURLPressed={this.urlChangeRequested} onDataChanged={this.channelDataChanged} @@ -233,6 +243,7 @@ class NewChannelFlow extends React.Component { channelData={channelData} serverError={this.state.serverError} onSubmitChannel={this.doSubmit} + onModalExited={this.onModalExited} onModalDismissed={this.props.onModalDismissed} onTypeSwitched={this.typeSwitched} onChangeURLPressed={this.urlChangeRequested} @@ -248,6 +259,7 @@ class NewChannelFlow extends React.Component { serverError={this.state.serverError} onModalSubmit={this.urlChangeSubmitted} onModalDismissed={this.urlChangeDismissed} + onModalExited={this.onModalExited} /> </span> ); |