Integrating loading state, refreshing props > re-paint (#3208)

Co-authored-by: Opender Singh <opender.singh@konghq.com>
This commit is contained in:
Mike Ellan 2021-03-22 11:39:33 -07:00 committed by GitHub
parent 05dfa7fa48
commit fd46942a6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,8 +255,10 @@ class SyncDropdown extends React.PureComponent<Props, State> {
} }
async _handleEnableSync() { async _handleEnableSync() {
this.setState({ loadingProjectPull: true });
const { vcs, workspace } = this.props; const { vcs, workspace } = this.props;
await vcs.switchAndCreateProjectIfNotExist(workspace._id, workspace.name); await vcs.switchAndCreateProjectIfNotExist(workspace._id, workspace.name);
await this.refreshMainAttributes({ loadingProjectPull: false });
} }
_handleShowDeleteModal() { _handleShowDeleteModal() {