fixed old search made new search default

This commit is contained in:
vabene1111
2021-07-29 16:55:57 +02:00
parent 8642298eda
commit 12a438752b
5 changed files with 28 additions and 6 deletions

View File

@ -37,6 +37,10 @@ export default {
label: String,
parent_variable: String,
initial_selection: Array,
limit: {
type: Number,
default: 10,
}
},
watch: {
initial_selection: function (newVal, oldVal) { // watch it
@ -50,7 +54,7 @@ export default {
search: function (query) {
let apiClient = new ApiApiFactory()
apiClient[this.search_function]({query: {query: query, limit: 10}}).then(result => {
apiClient[this.search_function]({query: {query: query, limit: this.limit}}).then(result => {
this.objects = result.data
})
},