Skip to content

Commit ae32138

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 1172105 commit ae32138

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
@@ -21,10 +21,10 @@
2121
<NcEmptyContent
2222
v-if="filteredUsers.length === 0"
2323
class="empty"
24-
:name="isInitialLoad && loading.users ? null : t('settings', 'No accounts')">
24+
:name="loading.users ? null : t('settings', 'No accounts')">
2525
<template #icon>
2626
<NcLoadingIcon
27-
v-if="isInitialLoad && loading.users"
27+
v-if="loading.users"
2828
:name="t('settings', 'Loading accounts …')"
2929
:size="64" />
3030
<NcIconSvgWrapper v-else :path="mdiAccountGroupOutline" :size="64" />
@@ -145,7 +145,6 @@ export default {
145145
146146
newUser: { ...newUser },
147147
editingUser: null,
148-
isInitialLoad: true,
149148
}
150149
},
151150
@@ -241,7 +240,6 @@ export default {
241240
242241
// watch url change and group select
243242
async selectedGroup(val) {
244-
this.isInitialLoad = true
245243
// if selected is the disabled group but it's empty
246244
await this.redirectIfDisabled()
247245
this.$store.commit('resetUsers')
@@ -312,7 +310,6 @@ export default {
312310
showError('Failed to load accounts')
313311
}
314312
this.loading.users = false
315-
this.isInitialLoad = false
316313
},
317314
318315
closeDialog() {

0 commit comments

Comments
 (0)