Skip to content
This repository has been archived by the owner on Sep 22, 2024. It is now read-only.

Commit

Permalink
field: input-image-picker, fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mtmsig committed Nov 20, 2019
1 parent 0b1d56f commit dbebfb9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/fields/input-image-picker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div class="header">
<div class="search">
<Input
v-model="searchInput"
v-model="input"
size="medium"
placeholder="Search"
@input="search"
Expand Down Expand Up @@ -95,7 +95,7 @@ export default {
},
data() {
return {
searchInput: "",
input: "",
image: null,
modal: {
loading: false,
Expand Down Expand Up @@ -131,9 +131,9 @@ export default {
this.modal.active = bool;
},
search(search) {
search() {
this.modal.loading = true;
this.getItemsDebounce({search});
this.getItemsDebounce();
},
getMore() {
Expand All @@ -143,7 +143,7 @@ export default {
getItemsDebounce() {},
async getItems({search, page = 1} = {}) {
async getItems({page = 1} = {}) {
const {
key,
endpoint: {params, url}
Expand All @@ -155,7 +155,7 @@ export default {
page,
filter: {
type: "image",
search
search: this.input
}
}
});
Expand Down Expand Up @@ -183,7 +183,7 @@ export default {
}
},
created() {
this.searchInput = "";
this.input = "";
this.getItemsDebounce = debounce(this.getItems, 400);
this.$watch("url", (url) => (this.image = url), {immediate: true});
}
Expand Down

0 comments on commit dbebfb9

Please sign in to comment.