diff --git a/apps/settings/src/components/Users/UserRow.vue b/apps/settings/src/components/Users/UserRow.vue index 86c192b68242b..678179a2f327f 100644 --- a/apps/settings/src/components/Users/UserRow.vue +++ b/apps/settings/src/components/Users/UserRow.vue @@ -250,12 +250,12 @@ :input-id="'manager' + uniqueId" :close-on-select="true" :disabled="isLoadingField" - :loading="idState.loading.manager" + :loading="idState.loadingPossibleManagers || idState.loading.manager" label="displayname" :options="idState.possibleManagers" :placeholder="managerLabel" class="select-vue" - @open="searchUserManager" + @open="searchInitialUserManager" @search="searchUserManager" @option:selected="updateUserManager" @input="updateUserManager" /> @@ -360,6 +360,7 @@ export default { return { selectedQuota: false, rand: Math.random().toString(36).substring(2), + loadingPossibleManagers: false, possibleManagers: [], currentManager: '', editing: false, @@ -550,6 +551,12 @@ export default { }) }, + async searchInitialUserManager() { + this.idState.loadingPossibleManagers = true + await this.searchUserManager() + this.idState.loadingPossibleManagers = false + }, + async searchUserManager(query) { await this.$store.dispatch('searchUsers', { offset: 0, limit: 10, search: query }).then(response => { const users = response?.data ? this.filterManagers(Object.values(response?.data.ocs.data.users)) : []