Make sure that minSearchStringLength is taken into account
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
4a5f18359f
commit
e60d9e4312
|
@ -96,6 +96,9 @@ export default {
|
||||||
loadingUsers: false,
|
loadingUsers: false,
|
||||||
selectedUser: null,
|
selectedUser: null,
|
||||||
userSuggestions: {},
|
userSuggestions: {},
|
||||||
|
config: {
|
||||||
|
minSearchStringLength: parseInt(OC.config['sharing.minSearchStringLength'], 10) || 0,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -128,6 +131,7 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.findUserDebounced = debounce(this.findUser, 300)
|
this.findUserDebounced = debounce(this.findUser, 300)
|
||||||
|
this.findUser('')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
start() {
|
start() {
|
||||||
|
@ -152,7 +156,7 @@ export default {
|
||||||
async findUser(query) {
|
async findUser(query) {
|
||||||
this.query = query.trim()
|
this.query = query.trim()
|
||||||
|
|
||||||
if (query.length < 3) {
|
if (query.length < this.config.minSearchStringLength) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue