fixed old search made new search default
This commit is contained in:
@ -133,7 +133,7 @@
|
||||
:initial_selection="settings.search_keywords"
|
||||
search_function="listKeywords" label="label"
|
||||
style="flex-grow: 1; flex-shrink: 1; flex-basis: 0"
|
||||
v-bind:placeholder="$t('Keywords')"></generic-multiselect>
|
||||
v-bind:placeholder="$t('Keywords')" :limit="50"></generic-multiselect>
|
||||
<b-input-group-append>
|
||||
<b-input-group-text>
|
||||
<b-form-checkbox v-model="settings.search_keywords_or" name="check-button"
|
||||
@ -155,7 +155,7 @@
|
||||
:initial_selection="settings.search_foods"
|
||||
search_function="listFoods" label="name"
|
||||
style="flex-grow: 1; flex-shrink: 1; flex-basis: 0"
|
||||
v-bind:placeholder="$t('Ingredients')"></generic-multiselect>
|
||||
v-bind:placeholder="$t('Ingredients')" :limit="20"></generic-multiselect>
|
||||
<b-input-group-append>
|
||||
<b-input-group-text>
|
||||
<b-form-checkbox v-model="settings.search_foods_or" name="check-button"
|
||||
@ -177,7 +177,7 @@
|
||||
:initial_selection="settings.search_books"
|
||||
search_function="listRecipeBooks" label="name"
|
||||
style="flex-grow: 1; flex-shrink: 1; flex-basis: 0"
|
||||
v-bind:placeholder="$t('Books')"></generic-multiselect>
|
||||
v-bind:placeholder="$t('Books')" :limit="50"></generic-multiselect>
|
||||
<b-input-group-append>
|
||||
<b-input-group-text>
|
||||
<b-form-checkbox v-model="settings.search_books_or" name="check-button"
|
||||
|
@ -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
|
||||
})
|
||||
},
|
||||
|
Reference in New Issue
Block a user