From 2f70ea074e9809481eae7de0bfa63da4e29677c5 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 19 Jul 2020 12:34:44 +0200 Subject: [PATCH] Not async url, but async function. --- .../js/components/transactions/AccountSelect.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/components/transactions/AccountSelect.vue b/resources/assets/js/components/transactions/AccountSelect.vue index 2d0d5c4a42..bd174010c9 100644 --- a/resources/assets/js/components/transactions/AccountSelect.vue +++ b/resources/assets/js/components/transactions/AccountSelect.vue @@ -49,7 +49,7 @@ :open-on-empty=true :open-on-focus=true v-on:input="selectedItem" - :async-src="accountAutoCompleteURI" + :async-function="aSyncFunction" v-model="name" :target="target" item-key="name_with_balance" @@ -133,6 +133,15 @@ }, methods: { + aSyncFunction: function (query, done) { + axios.get(this.accountAutoCompleteURI + query) + .then(res => { + done(res.data); + }) + .catch(err => { + // any error handler + }) + }, hasError: function () { return this.error.length > 0; },