2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-22 10:30:34 +03:00
This commit is contained in:
Jeff
2019-10-25 18:47:33 -07:00
parent 74917d2a5a
commit 4f409522de
3 changed files with 90 additions and 1 deletions
@@ -0,0 +1,30 @@
<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>
+8 -1
View File
@@ -114,7 +114,7 @@ module.exports = {
],
},
{
title: 'Digging Deeper',
title: 'Use Cases',
collapsable: false,
children: [
['guide/validation', 'Validation'],
@@ -122,6 +122,13 @@ module.exports = {
['guide/ajax', 'AJAX'],
],
},
{
title: 'Customizing',
collapsable: false,
children: [
['guide/keydown', 'Keydown Events'],
],
},
{
title: 'API',
collapsable: false,