mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-13 07:53:16 +00:00
Fix category autocomplete.
This commit is contained in:
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-empty=true
|
||||||
:open-on-focus=true
|
:open-on-focus=true
|
||||||
v-on:input="selectedItem"
|
v-on:input="selectedItem"
|
||||||
:async-src="categoryAutoCompleteURI"
|
:async-function="categoryAutoCompleteURI"
|
||||||
v-model="name"
|
v-model="name"
|
||||||
:target="target"
|
:target="target"
|
||||||
item-key="name"
|
item-key="name"
|
||||||
@@ -91,6 +91,15 @@
|
|||||||
hasError: function () {
|
hasError: function () {
|
||||||
return this.error.length > 0;
|
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) {
|
handleInput(e) {
|
||||||
if (typeof this.$refs.input.value === 'string') {
|
if (typeof this.$refs.input.value === 'string') {
|
||||||
this.$emit('input', this.$refs.input.value);
|
this.$emit('input', this.$refs.input.value);
|
||||||
|
Reference in New Issue
Block a user