Skip to content

Commit

Permalink
add keycodes note
Browse files Browse the repository at this point in the history
  • Loading branch information
sagalbot committed Nov 8, 2019
1 parent a87cb33 commit 1e6b0e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/guide/keydown.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

`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
it's just `[13]` for return. For example, maybe you want to tag on a comma keystroke:

<TagOnComma />

Expand All @@ -29,6 +29,9 @@ By default, the prop is a no–op returning the same object `map` object it rece
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.

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**

```js
Expand Down

0 comments on commit 1e6b0e9

Please sign in to comment.