Skip to content

Commit

Permalink
render - check for keypresses and if so open
Browse files Browse the repository at this point in the history
  • Loading branch information
brianvoe committed Nov 21, 2024
1 parent 58ba631 commit 61f1b6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/slim-select/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ export default class SlimSelect {
// Update settings
this.settings.isOpen = false
this.settings.isFullOpen = false

// Reset the content below
setTimeout(() => {
// Run afterClose callback
Expand Down
5 changes: 5 additions & 0 deletions src/slim-select/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ export default class Render {
return false
}

// Check if they type a-z, A-Z and 0-9
if (e.key.length === 1) {
this.callbacks.open()
}

return true
}

Expand Down

0 comments on commit 61f1b6e

Please sign in to comment.