2323
2424<template >
2525 <div >
26- <NcMultiselect :clear-on-select =" false"
26+ <NcSelect :clear-search -on-select =" false"
2727 :close-on-select =" false"
28- :hide-selected =" true"
29- :internal-search =" false"
3028 :loading =" showLoadingCircle"
29+ :get-option-key =" (option) => option.key"
3130 :options =" options"
3231 :placeholder =" t('forms', 'Search for user or group …')"
33- :preselect-first =" true"
34- :searchable =" true"
3532 :user-select =" true"
3633 label =" displayName"
37- track-by =" key"
38- @search-change =" asyncSearch"
39- @select =" addShare" >
40- <template #noOptions >
41- {{ t('forms', 'No recommendations. Start typing.') }}
42- </template >
43- <template #noResult >
34+ @search =" asyncSearch"
35+ @input =" addShare" >
36+ <template #no-options >
4437 {{ noResultText }}
4538 </template >
46- </NcMultiselect >
39+ </NcSelect >
4740 </div >
4841</template >
4942
5043<script >
5144import { generateOcsUrl } from ' @nextcloud/router'
5245import { getCurrentUser } from ' @nextcloud/auth'
5346import axios from ' @nextcloud/axios'
54- import NcMultiselect from ' @nextcloud/vue/dist/Components/NcMultiselect .js'
47+ import NcSelect from ' @nextcloud/vue/dist/Components/NcSelect .js'
5548import debounce from ' debounce'
5649
5750import OcsResponse2Data from ' ../../utils/OcsResponse2Data.js'
@@ -60,7 +53,7 @@ import logger from '../../utils/Logger.js'
6053
6154export default {
6255 components: {
63- NcMultiselect ,
56+ NcSelect ,
6457 },
6558
6659 mixins: [ShareTypes],
@@ -122,8 +115,8 @@ export default {
122115 * @return {string}
123116 */
124117 noResultText () {
125- if (this .loading ) {
126- return t (' forms' , ' Searching … ' )
118+ if (! this .query ) {
119+ return t (' forms' , ' No recommendations. Start typing. ' )
127120 }
128121 return t (' forms' , ' No elements found.' )
129122 },
@@ -308,7 +301,7 @@ export default {
308301 </script >
309302
310303<style lang="scss" scoped>
311- .multiselect {
304+ .select {
312305 margin-bottom : 8px !important ;
313306 width : 100% ;
314307 }
0 commit comments