Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expose preventDefault in react hook (#48) #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sytexa-julia
Copy link

So as not to break the API I opted to make preventDefault an optional parameter on the useKey and useKeyCombo hooks (React) / composables (Vue)

test: added tests for the preventDefault option in useKey/useKeyCombo for React and Vue
fix: useKeyCombo Vue composable was not unbinding key combos correctly

Vue Language Server was being painfully picky about the typings in useKeyCombo so I had to extract the generic type from the keystrokes instance... someone who knows more Typescript than me likely has a nicer way to handle this.

So as not to break the API I opted to make preventDefault an optional parameter on the useKey and useKeyCombo hooks (React) / composables (Vue)

test: added tests for the preventDefault option in useKey/useKeyCombo for React and Vue
fix: useKeyCombo Vue composable was not unbinding key combos correctly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant