2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 11:29:03 +00:00

Autocomplete: Set input value on prop change

This commit is contained in:
Faris Ansari 2018-10-05 11:02:18 +05:30
parent c20fd14c05
commit 71a23679f0
2 changed files with 7 additions and 5 deletions

View File

@ -13,6 +13,13 @@ export default {
render(h) {
return this.getWrapperElement(h);
},
watch: {
// prop change does not change the value of input
// this only happens for Autocomplete
value(newValue) {
this.$refs.input.value = newValue;
}
},
methods: {
getInputListeners() {
return {

View File

@ -8,11 +8,6 @@ import { _ } from 'frappejs/utils';
export default {
extends: Autocomplete,
watch: {
value(newValue) {
this.$refs.input.value = newValue;
}
},
methods: {
async getList(query) {
const list = await frappe.db.getAll({