File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 6666 :placeholder =" t('forms', 'Search for a user')"
6767 :user-select =" true"
6868 label =" displayName"
69- @search =" (query) => asyncSearch(query, true)" >
69+ @search ="
70+ (query) => asyncSearch(query, [SHARE_TYPES.SHARE_TYPE_USER])
71+ " >
7072 <template #no-options >
7173 {{ noResultText }}
7274 </template >
Original file line number Diff line number Diff line change @@ -76,14 +76,15 @@ export default {
7676 * Search for suggestions
7777 *
7878 * @param {string } query The search query to search for
79+ * @param {number[]|undefined } shareType The type of recipient to search.
7980 */
80- async asyncSearch ( query ) {
81+ async asyncSearch ( query , shareType ) {
8182 // save query to check if valid
8283 this . query = query . trim ( )
8384 if ( this . isValidQuery ) {
8485 // already set loading to have proper ux feedback during debounce
8586 this . loading = true
86- await this . debounceGetSuggestions ( query )
87+ await this . debounceGetSuggestions ( query , shareType )
8788 }
8889 } ,
8990
@@ -100,12 +101,13 @@ export default {
100101 * Get suggestions
101102 *
102103 * @param {string } query the search query
104+ * @param {number[]|undefined } shareType The type of recipient to search.
103105 */
104- async getSuggestions ( query ) {
106+ async getSuggestions ( query , shareType ) {
105107 this . loading = true
106108
107109 // Search for all used share-types, except public link.
108- const shareType = this . SHARE_TYPES_USED . filter (
110+ shareType ?? = this . SHARE_TYPES_USED . filter (
109111 ( type ) => type !== this . SHARE_TYPES . SHARE_TYPE_LINK ,
110112 )
111113
You can’t perform that action at this time.
0 commit comments