I am using V-SELECT
to do a select style Chosen
. Well, it works! But when I use "ENTER" to insert new elements, it gives SUBMIT
in the form. Is it possible for me to give submit only when I click the button and not when giving ENTER in input
?
HTML
<div id="app">
<h1>Vue Select</h1>
<p>Try to add items in input using "ENTER"</p>
<form v-on:submit.prevent="submited()">
<v-select multiselect :options="options"></v-select>
<button type="submit">Submit</button>
</form>
</div>
JS
Vue.component('v-select', VueSelect.VueSelect)
new Vue({
el: '#app',
data: {
options: ["some", "thing", "another", "things"]
},
methods: {
submited(){
alert('submited!')
}
}
})