2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-10 07:52:23 +03:00
Files
vue-select/docs/.vuepress/components/CustomHandlers.vue
T
2021-08-01 12:30:50 -07:00

27 lines
439 B
Vue

<template>
<v-select
taggable
multiple
no-drop
:map-keydown="handlers"
placeholder="enter an email"
/>
</template>
<script>
export default {
name: 'CustomHandlers',
methods: {
handlers: (map, vm) => ({
...map,
50: (e) => {
e.preventDefault()
if (e.key === '@' && vm.search.length > 0) {
vm.search = `${vm.search}@gmail.com`
}
},
}),
},
}
</script>