mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix category autocomplete.
This commit is contained in:
parent
3619427f60
commit
edf6ece7cb
2
public/v1/js/create_transaction.js
vendored
2
public/v1/js/create_transaction.js
vendored
File diff suppressed because one or more lines are too long
2
public/v1/js/edit_transaction.js
vendored
2
public/v1/js/edit_transaction.js
vendored
File diff suppressed because one or more lines are too long
@ -49,7 +49,7 @@
|
||||
:open-on-empty=true
|
||||
:open-on-focus=true
|
||||
v-on:input="selectedItem"
|
||||
:async-src="categoryAutoCompleteURI"
|
||||
:async-function="categoryAutoCompleteURI"
|
||||
v-model="name"
|
||||
:target="target"
|
||||
item-key="name"
|
||||
@ -91,6 +91,15 @@
|
||||
hasError: function () {
|
||||
return this.error.length > 0;
|
||||
},
|
||||
aSyncFunction: function (query, done) {
|
||||
axios.get(this.categoryAutoCompleteURI + query)
|
||||
.then(res => {
|
||||
done(res.data);
|
||||
})
|
||||
.catch(err => {
|
||||
// any error handler
|
||||
})
|
||||
},
|
||||
handleInput(e) {
|
||||
if (typeof this.$refs.input.value === 'string') {
|
||||
this.$emit('input', this.$refs.input.value);
|
||||
|
Loading…
Reference in New Issue
Block a user