]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make sure that minSearchStringLength is taken into account
authorJulius Härtl <jus@bitgrid.net>
Mon, 3 Feb 2020 10:59:10 +0000 (11:59 +0100)
committerJulius Härtl <jus@bitgrid.net>
Mon, 3 Feb 2020 10:59:10 +0000 (11:59 +0100)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/files/src/components/TransferOwnershipDialogue.vue

index d6f55879c631d891b425a87dda56c020c0c340aa..e88698c9a4fd4be179d3a260fa51ca8e7e6c817a 100644 (file)
@@ -96,6 +96,9 @@ export default {
                        loadingUsers: false,
                        selectedUser: null,
                        userSuggestions: {},
+                       config: {
+                               minSearchStringLength: parseInt(OC.config['sharing.minSearchStringLength'], 10) || 0,
+                       },
                }
        },
        computed: {
@@ -128,6 +131,7 @@ export default {
        },
        created() {
                this.findUserDebounced = debounce(this.findUser, 300)
+               this.findUser('')
        },
        methods: {
                start() {
@@ -152,7 +156,7 @@ export default {
                async findUser(query) {
                        this.query = query.trim()
 
-                       if (query.length < 3) {
+                       if (query.length < this.config.minSearchStringLength) {
                                return
                        }