Remove NewOrganization from DOM via state change directly on successful create, instead of via cancel method
parent
b12f8c841f
commit
33f1ab32c1
|
@ -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 => {
|
||||
|
|
|
@ -25,6 +25,7 @@ class OrganizationsTable extends Component {
|
|||
handleCreateOrganization = newOrganization => {
|
||||
const {onCreateOrg} = this.props
|
||||
onCreateOrg(newOrganization)
|
||||
this.setState({isCreatingOrganization: false})
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
Loading…
Reference in New Issue