I am building a search feature for my Nuxt Js front end and I need the input value to clear whenever the user has pressed enter to search. This is my current method and markup.
Js
methods: {
searchTag: function(event) {
var newtag = event.target.value;
this.tags.push({name: newtag});
}
}
Markup
<input type="text" placeholder="Search for tags..." v-on:keyup.enter="searchTag">
I tried adding event.target.reset(); but it didn't work, seems like such an easy thing but cannot find an answer anywhere, also want to stay away from using Jquery / plain JS as everything else is done without them and dont want to add it to the application for the sake of a tiny feature.
Thanks, Jamie