diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e91691a2..78cffdce2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,5 @@ # Changelog - ## v4.3.13 - 2025-06-25 [Full Changelog](https://github.com/nextcloud/forms/compare/v4.3.12...v4.3.13) diff --git a/src/components/SidebarTabs/TransferOwnership.vue b/src/components/SidebarTabs/TransferOwnership.vue index 7afb241c1..8c1470a0f 100644 --- a/src/components/SidebarTabs/TransferOwnership.vue +++ b/src/components/SidebarTabs/TransferOwnership.vue @@ -66,7 +66,9 @@ :placeholder="t('forms', 'Search for a user')" :user-select="true" label="displayName" - @search="(query) => asyncSearch(query, true)"> + @search=" + (query) => asyncSearch(query, [SHARE_TYPES.SHARE_TYPE_USER]) + "> diff --git a/src/mixins/UserSearchMixin.js b/src/mixins/UserSearchMixin.js index 39c5e6fa8..ae3651fbe 100644 --- a/src/mixins/UserSearchMixin.js +++ b/src/mixins/UserSearchMixin.js @@ -76,14 +76,15 @@ export default { * Search for suggestions * * @param {string} query The search query to search for + * @param {number[]|undefined} shareType The type of recipient to search. */ - async asyncSearch(query) { + async asyncSearch(query, shareType) { // save query to check if valid this.query = query.trim() if (this.isValidQuery) { // already set loading to have proper ux feedback during debounce this.loading = true - await this.debounceGetSuggestions(query) + await this.debounceGetSuggestions(query, shareType) } }, @@ -100,12 +101,13 @@ export default { * Get suggestions * * @param {string} query the search query + * @param {number[]|undefined} shareType The type of recipient to search. */ - async getSuggestions(query) { + async getSuggestions(query, shareType) { this.loading = true // Search for all used share-types, except public link. - const shareType = this.SHARE_TYPES_USED.filter( + shareType ??= this.SHARE_TYPES_USED.filter( (type) => type !== this.SHARE_TYPES.SHARE_TYPE_LINK, )