diff --git a/docs/.vuepress/components/TagOnComma.vue b/docs/.vuepress/components/TagOnComma.vue new file mode 100644 index 0000000..59e1d6a --- /dev/null +++ b/docs/.vuepress/components/TagOnComma.vue @@ -0,0 +1,4 @@ + diff --git a/docs/guide/keydown.md b/docs/guide/keydown.md index f2938ed..bdef0df 100644 --- a/docs/guide/keydown.md +++ b/docs/guide/keydown.md @@ -1,11 +1,17 @@ ### Customizing Keydown Behaviour --- -## `selectOnKeyCodes` +## selectOnKeyCodes +`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 + + + +<<< @/.vuepress/components/TagOnComma.vue - -## `mapKeyDown` +## mapKeyDown 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`. + + <<< @/.vuepress/components/CustomHandlers.vue -