mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-16 09:10:33 +03:00
31 lines
532 B
Vue
31 lines
532 B
Vue
<template>
|
|
<v-select
|
|
taggable
|
|
multiple
|
|
no-drop
|
|
:map-keydown="handlers"
|
|
placeholder="try tagging with space or comma to submit"
|
|
/>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'CustomHandlers',
|
|
methods: {
|
|
handlers (map, vm) {
|
|
const createTag = e => {
|
|
e.preventDefault();
|
|
vm.typeAheadSelect();
|
|
vm.searchEl.focus();
|
|
};
|
|
|
|
return {
|
|
...map, // defaults
|
|
32: createTag, // space
|
|
188: createTag, // comma
|
|
};
|
|
},
|
|
},
|
|
};
|
|
</script>
|