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 @@ -58,14 +58,15 @@ export default {
5858 * Search for suggestions
5959 *
6060 * @param {string } query The search query to search for
61+ * @param {number[] } shareType The type of recipient to search.
6162 */
62- async asyncSearch ( query ) {
63+ async asyncSearch ( query , shareType = [ ] ) {
6364 // save query to check if valid
6465 this . query = query . trim ( )
6566 if ( this . isValidQuery ) {
6667 // already set loading to have proper ux feedback during debounce
6768 this . loading = true
68- this . debounceGetSuggestions ( query )
69+ this . debounceGetSuggestions ( query , shareType )
6970 }
7071 } ,
7172
@@ -82,12 +83,13 @@ export default {
8283 * Get suggestions
8384 *
8485 * @param {string } query the search query
86+ * @param {number[]|undefined } shareType The type of recipient to search.
8587 */
86- async getSuggestions ( query ) {
88+ async getSuggestions ( query , shareType ) {
8789 this . loading = true
8890
8991 // Search for all used share-types, except public link.
90- const shareType = this . SHARE_TYPES_USED . filter (
92+ shareType ?? = this . SHARE_TYPES_USED . filter (
9193 ( type ) => type !== this . SHARE_TYPES . SHARE_TYPE_LINK ,
9294 )
9395
You can’t perform that action at this time.
0 commit comments