Remove NewOrganization from DOM via state change directly on successful create, instead of via cancel method

pull/10616/head
Jared Scheib 2017-11-09 23:40:35 -08:00
parent b12f8c841f
commit 33f1ab32c1
2 changed files with 2 additions and 2 deletions

View File

@ -36,11 +36,10 @@ class NewOrganization extends Component {
}
handleClickSave = () => {
const {onCancelCreateOrganization, onCreateOrganization} = this.props
const {onCreateOrganization} = this.props
const {name, defaultRole} = this.state
onCreateOrganization(name, defaultRole)
onCancelCreateOrganization()
}
handleChooseDefaultRole = role => {

View File

@ -25,6 +25,7 @@ class OrganizationsTable extends Component {
handleCreateOrganization = newOrganization => {
const {onCreateOrg} = this.props
onCreateOrg(newOrganization)
this.setState({isCreatingOrganization: false})
}
render() {