From b570f25209cd7c7e61fdbe3d8489741054fa4e12 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Thu, 28 Jul 2022 23:56:42 +0530 Subject: [PATCH] refactor/gui-v2-user-management-invite-ui-improvements --- .../components/dashboard/settings/UserManagement.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/nc-gui-v2/components/dashboard/settings/UserManagement.vue b/packages/nc-gui-v2/components/dashboard/settings/UserManagement.vue index a225ba9241..9d006321ba 100644 --- a/packages/nc-gui-v2/components/dashboard/settings/UserManagement.vue +++ b/packages/nc-gui-v2/components/dashboard/settings/UserManagement.vue @@ -38,7 +38,6 @@ const debouncedSearchText = useDebounce(searchText, 300) const loadUsers = async (page = currentPage, limit = currentLimit) => { try { if (!project.value?.id) return - isLoading = true // TODO: Types of api is not correct const response = await $api.auth.projectUserList(project.value?.id, { @@ -55,8 +54,6 @@ const loadUsers = async (page = currentPage, limit = currentLimit) => { } catch (e: any) { console.error(e) toast.error(await extractSdkResponseErrorMsg(e)) - } finally { - isLoading = false } } @@ -132,7 +129,12 @@ const copyInviteUrl = (user: User) => { onMounted(async () => { if (!users) { - await loadUsers() + isLoading = true + try { + await loadUsers() + } finally { + isLoading = false + } } })