Passthrough input ref
This commit is contained in:
parent
2e3b95b9ed
commit
f9d255b678
@ -67,7 +67,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
if (this.$root.settings.autocomplete) {
|
||||
require("../js/autocompletion").enable();
|
||||
require("../js/autocompletion").enable(this.$refs.input);
|
||||
}
|
||||
|
||||
const inputTrap = Mousetrap(this.$refs.input);
|
||||
|
@ -172,12 +172,12 @@ const backgroundColorStrategy = {
|
||||
index: 2,
|
||||
};
|
||||
|
||||
function enableAutocomplete() {
|
||||
function enableAutocomplete(inputRef) {
|
||||
enabled = true;
|
||||
let tabCount = 0;
|
||||
let lastMatch = "";
|
||||
let currentMatches = [];
|
||||
input = $("#input");
|
||||
input = $(inputRef);
|
||||
|
||||
input.on("input.tabcomplete", () => {
|
||||
tabCount = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user