2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-16 09:10:33 +03:00
Files
vue-select/docs/.vuepress/components/CustomHandlers.vue
T
2019-10-25 18:47:33 -07:00

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>