mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-20 19:42:02 +00:00
Not async url, but async function.
This commit is contained in:
@@ -49,7 +49,7 @@
|
|||||||
:open-on-empty=true
|
:open-on-empty=true
|
||||||
:open-on-focus=true
|
:open-on-focus=true
|
||||||
v-on:input="selectedItem"
|
v-on:input="selectedItem"
|
||||||
:async-src="accountAutoCompleteURI"
|
:async-function="aSyncFunction"
|
||||||
v-model="name"
|
v-model="name"
|
||||||
:target="target"
|
:target="target"
|
||||||
item-key="name_with_balance"
|
item-key="name_with_balance"
|
||||||
@@ -133,6 +133,15 @@
|
|||||||
},
|
},
|
||||||
methods:
|
methods:
|
||||||
{
|
{
|
||||||
|
aSyncFunction: function (query, done) {
|
||||||
|
axios.get(this.accountAutoCompleteURI + query)
|
||||||
|
.then(res => {
|
||||||
|
done(res.data);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
// any error handler
|
||||||
|
})
|
||||||
|
},
|
||||||
hasError: function () {
|
hasError: function () {
|
||||||
return this.error.length > 0;
|
return this.error.length > 0;
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user