Skip to content

Commit 71e52d0

Browse files
committed
fix(settings): Show loading spinner while searching accounts
Typing in the account search field briefly emptied the list and displayed "No accounts" until the request returned, which on large instances misled admins into thinking the query matched nothing. The empty-state now keeps the loading spinner visible whenever the list is empty and a fetch is in flight, regardless of whether it is the initial page load or a subsequent search/group switch. Signed-off-by: nfebe <fenn25.fn@gmail.com>
1 parent 9474c42 commit 71e52d0

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

apps/settings/src/components/UserList.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
<NcEmptyContent
1717
v-if="filteredUsers.length === 0"
1818
class="empty"
19-
:name="isInitialLoad && loading.users ? null : t('settings', 'No accounts')">
19+
:name="loading.users ? null : t('settings', 'No accounts')">
2020
<template #icon>
2121
<NcLoadingIcon
22-
v-if="isInitialLoad && loading.users"
22+
v-if="loading.users"
2323
:name="t('settings', 'Loading accounts …')"
2424
:size="64" />
2525
<NcIconSvgWrapper v-else :path="mdiAccountGroupOutline" :size="64" />
@@ -139,7 +139,6 @@ export default {
139139
},
140140
141141
newUser: { ...newUser },
142-
isInitialLoad: true,
143142
searchQuery: '',
144143
}
145144
},
@@ -231,7 +230,6 @@ export default {
231230
watch: {
232231
// watch url change and group select
233232
async selectedGroup(val) {
234-
this.isInitialLoad = true
235233
// if selected is the disabled group but it's empty
236234
await this.redirectIfDisabled()
237235
this.$store.commit('resetUsers')
@@ -309,7 +307,6 @@ export default {
309307
showError('Failed to load accounts')
310308
}
311309
this.loading.users = false
312-
this.isInitialLoad = false
313310
},
314311
315312
closeDialog() {

0 commit comments

Comments
 (0)