File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444 :loading =" loading "
4545 :options =" options "
4646 :placeholder =" t (' forms' , ' Search for a user' )"
47- @search =" asyncSearch " >
47+ @search ="
48+ (query ) => asyncSearch (query , [SHARE_TYPES .SHARE_TYPE_USER ])
49+ " >
4850 <template #no-options >
4951 {{ noResultText }}
5052 </template >
Original file line number Diff line number Diff line change @@ -59,14 +59,15 @@ export default {
5959 * Search for suggestions
6060 *
6161 * @param {string } query The search query to search for
62+ * @param {number[]|undefined } shareType The type of recipient to search.
6263 */
63- async asyncSearch ( query ) {
64+ async asyncSearch ( query , shareType ) {
6465 // save query to check if valid
6566 this . query = query . trim ( )
6667 if ( this . isValidQuery ) {
6768 // already set loading to have proper ux feedback during debounce
6869 this . loading = true
69- this . debounceGetSuggestions ( query )
70+ this . debounceGetSuggestions ( query , shareType )
7071 }
7172 } ,
7273
@@ -83,12 +84,13 @@ export default {
8384 * Get suggestions
8485 *
8586 * @param {string } query the search query
87+ * @param {number[]|undefined } shareType The type of recipient to search.
8688 */
87- async getSuggestions ( query ) {
89+ async getSuggestions ( query , shareType ) {
8890 this . loading = true
8991
9092 // Search for all used share-types, except public link.
91- const shareType = this . SHARE_TYPES_USED . filter (
93+ shareType ?? = this . SHARE_TYPES_USED . filter (
9294 ( type ) => type !== this . SHARE_TYPES . SHARE_TYPE_LINK ,
9395 )
9496
You can’t perform that action at this time.
0 commit comments