Skip to content

Commit

Permalink
feat: expose keydown event from Input component (#57)
Browse files Browse the repository at this point in the history
Co-authored-by: Hunter Johnston <[email protected]>
  • Loading branch information
deronek and huntabyte authored Feb 24, 2024
1 parent 020fd78 commit 1dbc8e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/dull-panthers-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cmdk-sv": patch
---

Expose keydown event from Input component
1 change: 1 addition & 0 deletions src/lib/cmdk/components/CommandInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
bind:value
use:action
{...$$restProps}
on:keydown
on:input
on:focus
on:blur
Expand Down
1 change: 1 addition & 0 deletions src/lib/cmdk/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ export type DialogProps<
//

export type InputEvents = {
keydown: KeyboardEvent;
blur: FocusEvent;
input: Event;
focus: FocusEvent;
Expand Down

0 comments on commit 1dbc8e8

Please sign in to comment.