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 = () => {
|
handleClickSave = () => {
|
||||||
const {onCancelCreateOrganization, onCreateOrganization} = this.props
|
const {onCreateOrganization} = this.props
|
||||||
const {name, defaultRole} = this.state
|
const {name, defaultRole} = this.state
|
||||||
|
|
||||||
onCreateOrganization(name, defaultRole)
|
onCreateOrganization(name, defaultRole)
|
||||||
onCancelCreateOrganization()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleChooseDefaultRole = role => {
|
handleChooseDefaultRole = role => {
|
||||||
|
|
|
@ -25,6 +25,7 @@ class OrganizationsTable extends Component {
|
||||||
handleCreateOrganization = newOrganization => {
|
handleCreateOrganization = newOrganization => {
|
||||||
const {onCreateOrg} = this.props
|
const {onCreateOrg} = this.props
|
||||||
onCreateOrg(newOrganization)
|
onCreateOrg(newOrganization)
|
||||||
|
this.setState({isCreatingOrganization: false})
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
Loading…
Reference in New Issue