2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00

complete documentation

This commit is contained in:
Jeff
2019-11-08 10:43:36 -08:00
parent af424159f7
commit a87cb3317e
2 changed files with 15 additions and 4 deletions
+4
View File
@@ -0,0 +1,4 @@
<template>
<!-- tag on 188/comma & 13/return -->
<v-select no-drop taggable multiple :select-on-key-codes="[188, 13]" />
</template>
+11 -4
View File
@@ -1,11 +1,17 @@
### Customizing Keydown Behaviour
---
## `selectOnKeyCodes`
## selectOnKeyCodes <Badge text="v3.3.0+" />
`selectOnKeyCodes {Array}` is an array of keyCodes that will trigger a typeAheadSelect. Any keyCodes
in this array will prevent the default event action and trigger a typeahead select. By default,
it's just `[13]` for return. For example, maybe you want to tag on a comma keystroke
<TagOnComma />
<<< @/.vuepress/components/TagOnComma.vue
## `mapKeyDown`
## mapKeyDown <Badge text="v3.3.0+" />
Vue Select provides the `map-keydown` Function prop to allow for customizing the components response to
keydown events while the search input has focus.
@@ -58,6 +64,7 @@ functionality, or add handlers for different keys that the component doesn't nor
This is example listens for the `@` key, and autocompletes an email address with `@gmail.com`.
<CustomHandlers />
<<< @/.vuepress/components/CustomHandlers.vue
<custom-handlers></custom-handlers>