2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-22 10:30:34 +03:00

add keycodes note

This commit is contained in:
Jeff
2019-11-08 10:50:36 -08:00
parent a87cb3317e
commit 1e6b0e98d0
+4 -1
View File
@@ -5,7 +5,7 @@
`selectOnKeyCodes {Array}` is an array of keyCodes that will trigger a typeAheadSelect. Any keyCodes `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, 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 it's just `[13]` for return. For example, maybe you want to tag on a comma keystroke:
<TagOnComma /> <TagOnComma />
@@ -29,6 +29,9 @@ By default, the prop is a noop returning the same object `map` object it rece
maps keyCodes to handlers: `{ <keyCode>: <callback> }`. Modifying this object can override default maps keyCodes to handlers: `{ <keyCode>: <callback> }`. Modifying this object can override default
functionality, or add handlers for different keys that the component doesn't normally listen for. functionality, or add handlers for different keys that the component doesn't normally listen for.
Note that any keyCodes you've added to `selectOnKeyCodes` will be passed to `map-keydown` as well,
so `map-keydown` will always take precedence.
**Default Handlers** **Default Handlers**
```js ```js