forked from AkkomaGang/akkoma-fe
Fetch all users in list before displaying
This commit is contained in:
parent
ab7001ed20
commit
9217ca8476
1 changed files with 3 additions and 4 deletions
|
@ -40,11 +40,10 @@ const ListNew = {
|
||||||
return this.userIds.map(userId => this.findUser(userId))
|
return this.userIds.map(userId => this.findUser(userId))
|
||||||
},
|
},
|
||||||
selectedUsers () {
|
selectedUsers () {
|
||||||
const users = this.selectedUserIds.map(userId => this.findUser(userId))
|
for (let i = 0; i < this.selectedUserIds.length; i++) {
|
||||||
if (users.includes(undefined)) {
|
this.$store.dispatch('fetchUserIfMissing', this.selectedUserIds[i])
|
||||||
return []
|
|
||||||
}
|
}
|
||||||
return users
|
return this.selectedUserIds.map(userId => this.findUser(userId))
|
||||||
},
|
},
|
||||||
availableUsers () {
|
availableUsers () {
|
||||||
if (this.query.length !== 0) {
|
if (this.query.length !== 0) {
|
||||||
|
|
Loading…
Reference in a new issue