From a87cb3317e82655f85c83545d8f46b393b7f8d92 Mon Sep 17 00:00:00 2001 From: Jeff Date: Fri, 8 Nov 2019 10:43:36 -0800 Subject: [PATCH] complete documentation --- docs/.vuepress/components/TagOnComma.vue | 4 ++++ docs/guide/keydown.md | 15 +++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 docs/.vuepress/components/TagOnComma.vue 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 -