diff --git a/src/views/admin/components/metadata-types/user/TainacanUser.vue b/src/views/admin/components/metadata-types/user/TainacanUser.vue index 4f04d5808..20ee49c38 100644 --- a/src/views/admin/components/metadata-types/user/TainacanUser.vue +++ b/src/views/admin/components/metadata-types/user/TainacanUser.vue @@ -107,10 +107,14 @@ export default { this.$emit('blur'); }, loadCurrentUsers() { - if ((Array.isArray(this.itemMetadatum.value) && this.itemMetadatum.value.length) || (!Array.isArray(this.itemMetadatum.value) && this.itemMetadatum.value)) { + if ( + (Array.isArray(this.itemMetadatum.value) && this.itemMetadatum.value.length) || + (!Array.isArray(this.itemMetadatum.value) && this.itemMetadatum.value) + ) { this.isLoading = true; - let query = qs.stringify({ include: this.itemMetadatum.value }); + let perPage = isNaN(this.itemMetadatum.value) ? this.itemMetadatum.value.length + 1 : 100; + let query = qs.stringify({ include: this.itemMetadatum.value, per_page: perPage }); let endpoint = '/users/'; wpApi.get(endpoint + '?' + query)