vue-awesomplete
vue-awesomplete copied to clipboard
Clearing the input
Hi,
Thanks for the plugin, it does the job well. There is one thing though, when trying to clear the input the shadow-root "inner-editor" doesn't allow that. Is there a way to get around this?
Thanks
How do you clear the input?
By reseting the text of input using plain Javascript.
Have you tried this.$refs.skills.internalValue = null
?
I'm trying to clear all inputs, and clearing button is in another component and I cannot access through this.$refs
.
Any updates on the issue?
I created a button ...
<div class="level-item" v-if="autocompleteDirty">
<a class="button is-small is-black is-inverted" @click="clearAutoComplete">
<span class="icon is-small"><i class="far fa-trash-alt"></i></span>
</a>
</div>
... whose click handler calls clearAutoComplete
...
clearAutoComplete() {
this.autocompleteDirty = false;
this.$refs.prsnPckr.$el.value = '';
},
this.autocompleteDirty = true;
gets called in the input event handle of the vue-awesomplete element.
(Layout handled by Buefy/Bulma)