Bug fix: invite user form not reseting post submission (#921)

This PR fixes the issue when the form used to stay at stale state post submission of new user
This commit is contained in:
Gandharv 2021-10-07 11:30:20 +05:30 committed by GitHub
parent 53d6d5d73c
commit c95620c538
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -141,6 +141,7 @@ class ManageOrgUsers extends React.Component {
.then(() => {
toast.success('User has been created', { hideProgressBar: true, position: 'top-center' });
this.fetchUsers();
this.setState({ creatingUser: false, showNewUserForm: false });
})
.catch(({ error }) => {
toast.error(error, { hideProgressBar: true, position: 'top-center' });